mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 1246128: F11 displays the audio container in fullscreen instead of the browser. r=bz
MozReview-Commit-ID: IWKJvwDaFsG --HG-- extra : rebase_source : 9a6d7e44236f37991c6501a281ba7de9ca55d1c0 extra : amend_source : 0debf792d5cde0f76a5580fcf91fb6fb2f4d48a6
This commit is contained in:
parent
9fa55e7044
commit
5f3cb73159
@ -4,9 +4,12 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
// <video> is used for top-level audio documents as well
|
||||
let videoElement = document.getElementsByTagName("video")[0];
|
||||
|
||||
// ignore standalone audio files
|
||||
if (videoElement.videoWidth == 0 || videoElement.videoHeight == 0)
|
||||
return;
|
||||
|
||||
// 1. Handle fullscreen mode;
|
||||
// 2. Send keystrokes to the video element if the body element is focused,
|
||||
// to be received by the event listener in videocontrols.xml.
|
||||
@ -15,7 +18,7 @@ document.addEventListener("keypress", ev => {
|
||||
return;
|
||||
|
||||
// Maximize the video when pressing F11,
|
||||
// because this is the standanlone video document.
|
||||
// because this is the standalone video document.
|
||||
if (ev.key == "F11") {
|
||||
// If we're in browser fullscreen mode, it means the user pressed F11
|
||||
// while browser chrome or another tab had focus.
|
||||
|
Loading…
Reference in New Issue
Block a user