Closed
Bug 495300
Opened 15 years ago
Closed 15 years ago
video hasn't really ended after seeking to end.
Categories
(Core :: Audio/Video, defect)
Core
Audio/Video
Tracking
()
VERIFIED
FIXED
mozilla1.9.2a1
People
(Reporter: Dolske, Assigned: roc)
References
Details
(Keywords: verified1.9.1)
Attachments
(1 file)
6.69 KB,
patch
|
cajbir
:
review+
beltzner
:
approval1.9.1+
|
Details | Diff | Splinter Review |
Noticed this while poking at bug 495159:
While the video is paused, press End (or drag scrubber to the end), then press play. Playback should start from the beginning, but it does nothing. Clicking play a 2nd time works. [Clicking play after normal playback hits the end of the video works correctly the first time.] It looks like the seek to the end is actually seeking to the before the last frame...
For example, with the ScannerDarkly.ogv video, pressing End (while paused at the beginning) gives:
videoctl: Got keystroke: end
videoctl: Got media event ----> waiting
videoctl: Got media event ----> seeking
videoctl: Got media event ----> timeupdate
videoctl: time update @ 125083ms of 125100ms
videoctl: Got media event ----> seeked
and then pressing play gives:
videoctl: Got media event ----> play
videoctl: Got media event ----> waiting
videoctl: Got media event ----> ended
videoctl: time update @ 125083ms of 125100ms
and then pressing play a 2nd time starts playback from the beginning.
Assignee | ||
Comment 1•15 years ago
|
||
When we seek to the end, we actually seek to the last frame and we don't go into the ended state. Maybe it's a bit weird to seek and then get an ended event even while you're paused. But if we don't do that, then we're stuck with the behaviour you see here. I'm not really sure what the spec wants us to do here.
Reporter | ||
Comment 2•15 years ago
|
||
(In reply to comment #1)
> Maybe it's a bit weird to seek and then get an ended
> event even while you're paused.
Yeah, that could be a bit strange. Maybe only do that if the seek is > the duration? Or when setting .currentTime to +Inf? [The latter might be useful in for the edge case of getting to the end of a video of unknown duration.] It might be possible to hack around this in the controls by forcing a play() after a seek to the end, but that seems kind of ugly.
Assignee | ||
Comment 3•15 years ago
|
||
Can you raise it in the WHATWG or public-html list?
Assignee | ||
Comment 4•15 years ago
|
||
Actually I think the spec might imply we should treat a seek to the end as "ended". See "When the current playback position reaches the end of the media resource when the direction of playback is forwards, then the user agent must follow these steps:" ... the question is whether "reaches" includes seeking or just playback.
Assignee | ||
Comment 5•15 years ago
|
||
Hixie confirms that's the right interpretation. I'll work on a fix.
Assignee | ||
Updated•15 years ago
|
Assignee: nobody → roc
Assignee | ||
Comment 6•15 years ago
|
||
This should fix it. However, it doesn't, because of a seeking/duration bug.
In seek.ogv, the reported duration is 3.833 seconds. My testcase actually seeks to 4.833 seconds, but this gets clamped to 3.833. Seeking finds a frame whose mDecodedFrameTime is 3.833 and stops there. However, there is a frame after that at mDecodedFrameTime 3.866, so my patch decides we're not at the end yet.
Assignee | ||
Comment 7•15 years ago
|
||
Comment on attachment 380303 [details] [diff] [review]
fix
OK, with the patch in bug 495366, this patch fixes this bug.
Attachment #380303 -
Flags: review?(chris.double)
Assignee | ||
Updated•15 years ago
|
Flags: wanted1.9.1+
Updated•15 years ago
|
Attachment #380303 -
Flags: review?(chris.double) → review+
Assignee | ||
Comment 8•15 years ago
|
||
Comment on attachment 380303 [details] [diff] [review]
fix
This fix is reasonably simple, makes us conform to the spec and prevents some bad UI behaviour when the user seeks to the end of the stream.
Attachment #380303 -
Flags: approval1.9.1?
Comment 9•15 years ago
|
||
I'd support this if you're really sure that it's not going to cause any other sideeffects.
Assignee | ||
Comment 10•15 years ago
|
||
I'm pretty sure. It definitely only affects seeking and it only adds new code to the seeking path that's like code we already have there. If antying strange happens it's almost certainly going to be restricted to the case where we seek to the end.
Comment 11•15 years ago
|
||
Comment on attachment 380303 [details] [diff] [review]
fix
a191=beltzner
Attachment #380303 -
Flags: approval1.9.1? → approval1.9.1+
Assignee | ||
Updated•15 years ago
|
Whiteboard: [needs landing]
Assignee | ||
Comment 12•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/513bc84a1492
Plus bustage fix:
http://hg.mozilla.org/mozilla-central/rev/52749323e947
Status: NEW → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [needs landing] → [needs 191 landing]
Assignee | ||
Comment 13•15 years ago
|
||
Keywords: fixed1.9.1
Whiteboard: [needs 191 landing]
Comment 14•15 years ago
|
||
verified FIXED on builds:
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090602 Minefield/3.6a1pre ID:20090602050429
and
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1pre) Gecko/20090602 Shiretoko/3.5pre ID:20090602031310
Status: RESOLVED → VERIFIED
Keywords: fixed1.9.1 → verified1.9.1
Updated•15 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
Target Milestone: --- → mozilla1.9.2a1
You need to log in
before you can comment on or make changes to this bug.
Description
•