Closed Bug 449518 Opened 17 years ago Closed 17 years ago

Video autostart after doing Back/Forward history button on browser

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: BijuMailList, Assigned: cajbir)

References

Details

(Keywords: testcase)

Attachments

(1 file, 2 obsolete files)

Video automatically start after doing Back button on browser and then coming back by pressing Forward button on browser. This also happens if we navigates away from a page with not started video Steps: 1. ensure Javascript is enabled 2. Goto URL http://simon.html5.org/test/html/semantics/video/ 3. click link for 002.htm 4. wait for both video to appear as STOPPED 5. press back button on browser 6. press FORWARD BUTTON on browser to reach 002.htm Result:- Video start playing, Expected:- Video should not play.
Assignee: nobody → chris.double
Status: NEW → ASSIGNED
Attachment #345015 - Flags: superreview?(roc)
Attachment #345015 - Flags: review?(roc)
Requires patch from bug 457964 due to change in paused attribute type
Depends on: 457964
I don't think we should be involving nsVideoFrame here. StopVideoInstance should just operate directly on the content (right now I think display:none content won't be freezing/thawing properly). So it's probably best if nsHTMLMediaElement just has Freeze and Thaw methods and saves its state internally.
Attached patch Address review comments (obsolete) — Splinter Review
Address review comments
Attachment #345015 - Attachment is obsolete: true
Attachment #345029 - Flags: superreview?(roc)
Attachment #345029 - Flags: review?(roc)
Attachment #345015 - Flags: superreview?(roc)
Attachment #345015 - Flags: review?(roc)
+ // Handle moving into and out of the bfcache by pausing and playing + // as needed. + NS_IMETHOD Freeze(); + NS_IMETHOD Thaw(); These don't need to be virtual. +#ifdef MOZ_MEDIA + EnumeratePlugins(domDoc, NS_LITERAL_STRING("video"), StopMediaInstance); +#endif Shouldn't we enumerate audio elements here too? + nsHTMLMediaElement* element = (nsHTMLMediaElement*)aContent; static_cast
Attachment #345029 - Attachment is obsolete: true
Attachment #345031 - Flags: superreview?(roc)
Attachment #345031 - Flags: review?(roc)
Attachment #345029 - Flags: superreview?(roc)
Attachment #345029 - Flags: review?(roc)
Attachment #345031 - Flags: superreview?(roc)
Attachment #345031 - Flags: superreview+
Attachment #345031 - Flags: review?(roc)
Attachment #345031 - Flags: review+
It seems that elements that aren't in the document, but are playing audio, won't get frozen and will keep playing while in the bfcache. I guess we should have a separate bug on that.
This was also raised in bug 454971 comment 10. Maybe fix it as part of that bug?
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Depends on: 466607
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: