mirror of
https://github.com/mehotkhan/BandersnatchInteractive.git
synced 2025-07-27 17:23:22 +00:00
assets/scripts.js: Fix Space not unpausing with visible controls
When the video controls are visible, the video is paused, and the video element is focused, pressing Space would unpause the video and then immediately pause it again.
This commit is contained in:
parent
ea6ff3f69e
commit
7989e92f2b
1 changed files with 4 additions and 0 deletions
|
@ -416,6 +416,10 @@ window.onload = function() {
|
|||
if (e.code == 'Space')
|
||||
togglePlayPause();
|
||||
};
|
||||
video_selector.onkeydown = function(e) {
|
||||
if (e.code == 'Space')
|
||||
e.preventDefault();
|
||||
};
|
||||
|
||||
document.onkeydown = function (e) {
|
||||
if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue