Skip to content

Commit 8725196

Browse files
committed
fix: keep playing state after seek
1 parent e501555 commit 8725196

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

videojs.hotkeys.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -162,38 +162,24 @@
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

0 commit comments

Comments
 (0)