Distinguish readyState=ended due to error

RESOLVED FIXED in Firefox 38

Status

()

P2
normal
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: jya, Assigned: jya)

Tracking

(Blocks: 1 bug)

Trunk
mozilla39
x86
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox37 wontfix, firefox38 fixed, firefox39 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
We should be able to distinguish if the end of stream algorithm was called with an error set or not.

If error is not set:
        1. Run the duration change algorithm with new duration set to the highest end time reported by the buffered attribute across all SourceBuffer objects in sourceBuffers.
        Note
        This allows the duration to properly reflect the end of the appended media segments. For example, if the duration was explicitly set to 10 seconds and only media segments for 0 to 5 seconds were appended before endOfStream() was called, then the duration will get updated to 5 seconds.
        2. Notify the media element that it now has all of the media data.

Currently we make no distinction, and only store that we are in ended mode.

When EndOfStream() was explicitly called, MediaSourceReader shouldn't return WAITING_FOR_DATA.
(Assignee)

Comment 1

4 years ago
In the above message, the reference is http://w3c.github.io/media-source/#end-of-stream-algorithm

Updated

4 years ago
Priority: -- → P2
(Assignee)

Comment 2

4 years ago
Consider an explicit call to EndOfStream (with no error) as meaning we have all the data. Also signal the MediaSourceReader when we move from ended to open (we could only ever turn on ended mode before). We still need to handle properly when going into ended mode, such as aborting current wait. This will be done in bug 1143971.
Attachment #8579733 - Flags: review?(matt.woodrow)
(Assignee)

Updated

4 years ago
Assignee: nobody → jyavenard
Status: NEW → ASSIGNED
Attachment #8579733 - Flags: review?(matt.woodrow) → review+
https://hg.mozilla.org/mozilla-central/rev/43525f7e2fd9
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
status-firefox39: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
(Assignee)

Updated

4 years ago
Flags: needinfo?(giles)
Comment on attachment 8579733 [details] [diff] [review]
Mark reader has ended when EndOfStream explicit

Approval Request Comment
[Feature/regressing bug #]: MSE
[User impact if declined]: Spec compliance. Could cause unnecessary network traffic or confuse player js content.
[Describe test coverage new/current, TreeHerder]: Landed on m-c.
[Risks and why]: Change is confined to the MSE code, and a straightforward implementation of a documented TODO. Looks safe enough to me.
[String/UUID change made/needed]: None.
Flags: needinfo?(giles)
Attachment #8579733 - Flags: approval-mozilla-aurora?
status-firefox37: --- → fixed
status-firefox38: --- → affected
status-firefox37: fixed → wontfix
Attachment #8579733 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
(Assignee)

Updated

4 years ago
Duplicate of this bug: 1131919
You need to log in before you can comment on or make changes to this bug.