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:
Alastor Wu 2015-09-09 10:41:33 +08:00
parent 369854d84e
commit fe229da440

View File

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