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:
Vladimir Panteleev 2019-07-28 04:37:36 +00:00
parent ea6ff3f69e
commit 7989e92f2b

View file

@ -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)