Bug 1545340 - Hide Picture-in-Picture toggle on <audio controls/> elements. r=jaws
authorMike Conley <mconley@mozilla.com>
Thu, 18 Apr 2019 13:01:15 +0000
changeset 470084 b311c12d8854f0d6fb71d62c7cb15105de43a3bd
parent 470083 84110efda7165c81b707b3a2b8880b8aa44df7c1
child 470085 4dbd2a962bcf9dfb3c47f2a9e4eda86e89063106
push id112843
push useraiakab@mozilla.com
push dateFri, 19 Apr 2019 09:50:22 +0000
treeherdermozilla-inbound@c06f27cbfe40 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1545340
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1545340 - Hide Picture-in-Picture toggle on <audio controls/> elements. r=jaws Depends on D27951 Differential Revision: https://phabricator.services.mozilla.com/D28016
toolkit/content/widgets/videocontrols.js
--- a/toolkit/content/widgets/videocontrols.js
+++ b/toolkit/content/widgets/videocontrols.js
@@ -265,17 +265,19 @@ this.VideoControlsImplWidget = class {
           this.startFadeOut(this.clickToPlay, true);
           this.statusIcon.setAttribute("type", "error");
           this.updateErrorText();
           this.setupStatusFader(true);
         } else if (VideoControlsWidget.isPictureInPictureVideo(this.video)) {
           this.setShowPictureInPictureMessage(true);
         }
 
-        if (!this.pipToggleEnabled || this.isShowingPictureInPictureMessage) {
+        if (!this.pipToggleEnabled ||
+            this.isShowingPictureInPictureMessage ||
+            this.isAudioOnly) {
           this.pictureInPictureToggleButton.setAttribute("hidden", true);
         }
 
         let adjustableControls = [
           ...this.prioritizedControls,
           this.controlBar,
           this.clickToPlay,
         ];