diff options
Diffstat (limited to 'youtube/static')
-rw-r--r-- | youtube/static/js/hotkeys.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube/static/js/hotkeys.js b/youtube/static/js/hotkeys.js index d8a2f53..2cd2336 100644 --- a/youtube/static/js/hotkeys.js +++ b/youtube/static/js/hotkeys.js @@ -26,8 +26,8 @@ function onKeyDown(e) { } else if (c == "f") { e.preventDefault(); - if (document.fullscreenElement) document.exitFullscreen(); - else v.requestFullscreen(); + if (document.fullscreenElement && document.fullscreenElement.nodeName == 'VIDEO') {document.exitFullscreen();} + else {v.requestFullscreen()}; } else if (c == "m") { if (v.muted == false) {v.muted = true;} |