Closed Bug 868660 Opened 12 years ago Closed 12 years ago

Missing document inactive check in media element

Categories

(Core :: Audio/Video, defect)

21 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: johns, Assigned: johns)

Details

Attachments

(1 file, 1 obsolete file)

I've noticed a few, unreproducible instances of <video> tags continuing to play after navigating, and suspect this is the culprit
@cpearce would you be the right one to review this?
Attachment #745425 - Flags: review?(cpearce)
Comment on attachment 745425 [details] [diff] [review] Add missing check for media paused in inactive documents Review of attachment 745425 [details] [diff] [review]: ----------------------------------------------------------------- I think roc should review this. ::: content/html/content/src/HTMLMediaElement.cpp @@ +3062,5 @@ > SetPlayedOrSeeked(true); > if (mCurrentPlayRangeStart == -1.0) { > mCurrentPlayRangeStart = CurrentTime(); > } > + if (!mPausedForInactiveDocumentOrChannel) { Maybe the !mPausedForInactiveDocumentOrChannel check should be added to CanActivateAutoplay() instead?
Attachment #745425 - Flags: review?(cpearce) → review?(roc)
Comment on attachment 745425 [details] [diff] [review] Add missing check for media paused in inactive documents Review of attachment 745425 [details] [diff] [review]: ----------------------------------------------------------------- ::: content/html/content/src/HTMLMediaElement.cpp @@ +3062,5 @@ > SetPlayedOrSeeked(true); > if (mCurrentPlayRangeStart == -1.0) { > mCurrentPlayRangeStart = CurrentTime(); > } > + if (!mPausedForInactiveDocumentOrChannel) { Yes, I think that would be slightly better. This check should definitely be done for the mSrcStream case as well.
Moved to CanActivateAutoplay
Attachment #745425 - Attachment is obsolete: true
Attachment #745425 - Flags: review?(roc)
Attachment #751222 - Flags: review?(roc)
Comment on attachment 751222 [details] [diff] [review] Add missing check for media paused in inactive documents https://hg.mozilla.org/integration/mozilla-inbound/rev/c294faeff580
Attachment #751222 - Flags: checkin+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: