mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 1188754 - Do not notify the audio channel agent on Firefox OS when the document activity change callback detects that the element is muted by the audio channel; r=baku
This commit is contained in:
parent
69f9b31b35
commit
e5b36bb128
@ -4006,7 +4006,15 @@ bool HTMLMediaElement::IsBeingDestroyed()
|
||||
void HTMLMediaElement::NotifyOwnerDocumentActivityChanged()
|
||||
{
|
||||
bool pauseElement = NotifyOwnerDocumentActivityChangedInternal();
|
||||
if (pauseElement && mAudioChannelAgent) {
|
||||
if (pauseElement && mAudioChannelAgent
|
||||
#ifdef PAUSE_MEDIA_ELEMENT_FROM_AUDIOCHANNEL
|
||||
// On B2G, NotifyOwnerDocumentActivityChangedInternal may return true for
|
||||
// two reasons: the document no longer being active, or the element being
|
||||
// paused by the audio channel. However we are only interested in the
|
||||
// first case here, so we need to filter out the second case.
|
||||
&& !ComputedMuted()
|
||||
#endif
|
||||
) {
|
||||
// If the element is being paused since we are navigating away from the
|
||||
// document, notify the audio channel agent.
|
||||
// Be careful to ignore this event during a docshell frame swap.
|
||||
|
Loading…
Reference in New Issue
Block a user