Bug 1328058 - part3 : don't show the sound indicator for video with silent audio track draft
authorAlastor Wu <alwu@mozilla.com>
Fri, 03 Feb 2017 14:47:13 +0800
changeset 478949 b6d094a68b8f8e679ba2edac72282395a216e516
parent 478948 8e5857585f53650f1505979ccb863039a1d9db7e
child 478950 8849430ba90cb34aa48f68e88498e8b6e05c9ebe
push id44105
push useralwu@mozilla.com
push dateSat, 04 Feb 2017 07:04:06 +0000
bugs1328058
milestone54.0a1
Bug 1328058 - part3 : don't show the sound indicator for video with silent audio track After resume the tab, we shouldn't show sound indicator directly because we don't know whether the blocked media is audible or not. MozReview-Commit-ID: KccDtzTNmx3
browser/base/content/tabbrowser.xml
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -7104,24 +7104,16 @@
           let browser = this.linkedBrowser;
           let modifiedAttrs = [];
           let hist = Services.telemetry.getHistogramById("TAB_AUDIO_INDICATOR_USED");
 
           if (browser.audioBlocked) {
             this.removeAttribute("blocked");
             modifiedAttrs.push("blocked");
 
-            // We don't want sound icon flickering between "blocked", "none" and
-            // "sound-playing", here adding the "soundplaying" is to keep the
-            // transition smoothly.
-            if (!this.hasAttribute("soundplaying")) {
-              this.setAttribute("soundplaying", true);
-              modifiedAttrs.push("soundplaying");
-            }
-
             browser.resumeMedia();
             hist.add(3 /* unblockByClickingIcon */);
             this.finishMediaBlockTimer();
           } else {
             if (browser.audioMuted) {
               browser.unmute();
               this.removeAttribute("muted");
               BrowserUITelemetry.countTabMutingEvent("unmute", aMuteReason);