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
--- 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);