Open
Bug 1386489
Opened 7 years ago
Updated 2 years ago
media.ended is false after seeking to the end of the resource
Categories
(Core :: Audio/Video: Playback, defect, P3)
Core
Audio/Video: Playback
Tracking
()
REOPENED
People
(Reporter: jwwang, Unassigned)
References
Details
Attachments
(2 files)
No description provided.
Reporter | ||
Comment 1•7 years ago
|
||
Assignee: nobody → jwwang
Status: NEW → ASSIGNED
Reporter | ||
Comment 2•7 years ago
|
||
Add a test case to demonstrate the issue. Note this bug depends on the CPU scheduling and is very hard to reproduce. I found it slightly reproducible using rr with chaos mode. ./mach run path-to-the-html-file --disable-e10s --debugger=rr --debugger-args="record --chaos"
Reporter | ||
Comment 4•7 years ago
|
||
This bug is a regression of bug 1317576. When we seek to the end of the resource, MDSM will: 1. resolve the seek promise which will call HTMLMediaElement::SeekCompleted() 2. dispatch MediaDecoder::PlaybackEnded() to the main thread. There is a race between: a. HTMLMediaElement::SeekCompleted() queues a 'seeked' event. b. MDSM queues an event (in the main thread event queue) to run MediaDecoder::PlaybackEnded(). If a. comes first, the 'seeked' handler will see media.ended==false. We should kinda revert bug 1317576 P2 to pass a flag to the resolve value of the seek promise to indicate seeking has reached the end. Then MediaDecoder will transition to ENDED before 'seeked' is fired.
Blocks: 1317576
Reporter | ||
Comment 5•7 years ago
|
||
Well, it turns out that Chrome fails the test case immediately. Come to think about it again, since metadata can lie about the duration and duration can change dynamically during playback, we can't just assume playback will reach the end in the 'seeked' handler by doing |v.currentTime = v.duration|. I will mark this bug as INVALID.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 6•7 years ago
|
||
I opened an issue in the whatwg group: https://github.com/whatwg/html/issues/2885 Let's wait for the discussion to reach a conclusion.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Comment 7•2 years ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
Assignee: suro001 → nobody
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•