mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1201969 - pause element only when start playing. r=baku
--HG-- extra : transplant_source : %F8%A7%11%0D%F2%E6-%C6%8F%2C%D2%01e.%FE%AC%DF%85%11%FD
This commit is contained in:
parent
369854d84e
commit
fe229da440
@ -4075,7 +4075,13 @@ HTMLMediaElement::NotifyOwnerDocumentActivityChangedInternal()
|
||||
|
||||
bool pauseElement = !IsActive();
|
||||
#ifdef PAUSE_MEDIA_ELEMENT_FROM_AUDIOCHANNEL
|
||||
pauseElement |= ComputedMuted();
|
||||
// Only pause the element when we start playing. If we pause without playing
|
||||
// audio, the resource loading would be affected unexpectedly. For example,
|
||||
// the media element is muted by default, but we don't want this behavior
|
||||
// interrupting the loading process.
|
||||
if (mAudioChannelAgent) {
|
||||
pauseElement |= ComputedMuted();
|
||||
}
|
||||
#endif
|
||||
|
||||
SuspendOrResumeElement(pauseElement, !IsActive());
|
||||
|
Loading…
Reference in New Issue
Block a user