File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -89,11 +89,14 @@ webrtcperf.startFakeScreenshare = (
89
89
el . setAttribute ( 'frameborder' , '0' )
90
90
wrapper . appendChild ( el )
91
91
92
+ let cur = 0
92
93
advanceSlide = async ( ) => {
93
- try {
94
- await window . keypressText ( 'iframe' , ' ' ) //0x24
95
- } catch ( e ) {
96
- console . error ( e )
94
+ if ( cur >= slides ) {
95
+ cur = 0
96
+ await window . keypressText ( 'iframe' , String . fromCharCode ( 0x24 ) )
97
+ } else {
98
+ await window . keypressText ( 'iframe' , ' ' )
99
+ cur ++
97
100
}
98
101
}
99
102
} else {
@@ -130,6 +133,7 @@ webrtcperf.startFakeScreenshare = (
130
133
wrapper . appendChild ( img )
131
134
slidesElements . push ( img )
132
135
}
136
+
133
137
let cur = 0
134
138
advanceSlide = async ( ) => {
135
139
const next = cur === slidesElements . length - 1 ? 0 : cur + 1
You can’t perform that action at this time.
0 commit comments