File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 162162
163163 // Seeking with the left/right arrow keys
164164 case cRewind : // Seek Backward
165- wasPlaying = ! player . paused ( ) ;
166165 ePreventDefault ( ) ;
167- if ( wasPlaying ) {
168- player . pause ( ) ;
169- }
170166 seekTime = player . currentTime ( ) - seekStepD ( event ) ;
171167 // The flash player tech will allow you to seek into negative
172168 // numbers and break the seekbar, so try to prevent that.
173169 if ( seekTime <= 0 ) {
174170 seekTime = 0 ;
175171 }
176172 player . currentTime ( seekTime ) ;
177- if ( wasPlaying ) {
178- silencePromise ( player . play ( ) ) ;
179- }
180173 break ;
181174 case cForward : // Seek Forward
182- wasPlaying = ! player . paused ( ) ;
183175 ePreventDefault ( ) ;
184- if ( wasPlaying ) {
185- player . pause ( ) ;
186- }
187176 seekTime = player . currentTime ( ) + seekStepD ( event ) ;
188177 // Fixes the player not sending the end event if you
189178 // try to seek past the duration on the seekbar.
190179 if ( seekTime >= duration ) {
191180 seekTime = wasPlaying ? duration - .001 : duration ;
192181 }
193182 player . currentTime ( seekTime ) ;
194- if ( wasPlaying ) {
195- silencePromise ( player . play ( ) ) ;
196- }
197183 break ;
198184
199185 // Volume control with the up/down arrow keys
You can’t perform that action at this time.
0 commit comments