Bug 1328058 - part3 : don't show the sound indicator for video with silent audio track r=baku
☠☠ backed out by 8c32b1b8aa92 ☠ ☠
authorAlastor Wu <alwu@mozilla.com>
Fri, 03 Feb 2017 11:25:08 +0800
changeset 332339 0c177bdf5ec302d937f1c428e78c3ad2a96ed838
parent 332338 b369d9999b8a7dcaf4809ff9697f03e47d0ef393
child 332340 37d35ca95b1fd6efbd576190d007a2ec6e6c90c0
push id31303
push usercbook@mozilla.com
push dateFri, 03 Feb 2017 12:23:51 +0000
treeherdermozilla-central@28bb04d0338d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1328058
milestone54.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 1328058 - part3 : don't show the sound indicator for video with silent audio track r=baku 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);