fix: when the seek input is focused and the video is playing, the space key can't make the video pause, because after 'keyup', it always make the video play
This commit is contained in:
parent
c95d9923f7
commit
84424f7f67
@ -563,6 +563,12 @@ class Listeners {
|
||||
on(this.player.elements.inputs.seek, 'mousedown mouseup keydown keyup touchstart touchend', event => {
|
||||
const seek = event.currentTarget;
|
||||
|
||||
const code = event.keyCode ? event.keyCode : event.which;
|
||||
const eventType = event.type;
|
||||
|
||||
if ((eventType === 'keydown' || eventType === 'keyup') && (code !== 39 && code !== 37)) {
|
||||
return;
|
||||
}
|
||||
// Was playing before?
|
||||
const play = seek.hasAttribute('play-on-seeked');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user