зеркало из https://github.com/mozilla/gecko-dev.git
Mute audio immediately on tab closure (bug 1355242). r=florian
MozReview-Commit-ID: BO161kV2UWE --HG-- extra : rebase_source : 9d74976581efdccb07845dee5b84e77d8b6b8b92
This commit is contained in:
Родитель
eab3fbb07a
Коммит
571c7ea21b
|
@ -2851,6 +2851,13 @@
|
|||
newTab = true;
|
||||
}
|
||||
|
||||
// Mute audio immediately to improve perceived speed of tab closure.
|
||||
if (aTab.hasAttribute("soundplaying")) {
|
||||
// Don't persist the muted state as this wasn't a user action.
|
||||
// This lets undo-close-tab return it to an unmuted state.
|
||||
aTab.linkedBrowser.mute(true);
|
||||
}
|
||||
|
||||
aTab.closing = true;
|
||||
this._removingTabs.push(aTab);
|
||||
this._visibleTabs = null; // invalidate cache
|
||||
|
|
|
@ -757,9 +757,12 @@
|
|||
readonly="true"/>
|
||||
|
||||
<method name="mute">
|
||||
<parameter name="transientState"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
this._audioMuted = true;
|
||||
if (!transientState) {
|
||||
this._audioMuted = true;
|
||||
}
|
||||
this.messageManager.sendAsyncMessage("AudioPlayback",
|
||||
{type: "mute"});
|
||||
]]>
|
||||
|
|
Загрузка…
Ссылка в новой задаче