Bug 1329122 - should unregister agent when media element becomes inactive. r=baku
We should remove the media control interface immediately when the document is inacitve, even it was paused by media control before. MozReview-Commit-ID: GBDhzEFOTXE
This commit is contained in:
@@ -1030,6 +1030,11 @@ private:
|
||||
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;
|
||||
@@ -1040,11 +1045,6 @@ private:
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user