author | Alastor Wu <alwu@mozilla.com> |
Wed, 22 Mar 2017 00:04:24 +0800 | |
changeset 348758 | 9857a6a7000061909a0ef75242c4f198d87b1de4 |
parent 348757 | 9e59049712448824a3717ce2d9dcbe1cf07da941 |
child 348759 | b8d4e0ec2f08bef459b679aac105bcf3544d642f |
push id | 31535 |
push user | cbook@mozilla.com |
push date | Wed, 22 Mar 2017 13:25:07 +0000 |
treeherder | mozilla-central@ee30286771eb [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | baku |
bugs | 1329122 |
milestone | 55.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/dom/html/HTMLMediaElement.cpp +++ b/dom/html/HTMLMediaElement.cpp @@ -1025,31 +1025,31 @@ private: bool IsPlayingThroughTheAudioChannel() const { // If we have an error, we are not playing. if (mOwner->GetError()) { return false; } + // We should consider any bfcached page or inactive document as non-playing. + if (!mOwner->IsActive()) { + return false; + } + // It might be resumed from remote, we should keep the audio channel agent. if (IsSuspended()) { return true; } // Are we paused if (mOwner->mPaused) { return false; } - // We should consider any bfcached page or inactive document as non-playing. - if (!mOwner->IsActive()) { - return false; - } - // A loop always is playing if (mOwner->HasAttr(kNameSpaceID_None, nsGkAtoms::loop)) { return true; } // If we are actually playing... if (mOwner->IsCurrentlyPlaying()) { return true;