Closed Bug 1141333 Opened 5 years ago Closed 5 years ago

Distinguish readyState=ended due to error

Categories

(Core :: Audio/Video, defect, P2)

x86
macOS
defect

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox37 --- wontfix
firefox38 --- fixed
firefox39 --- fixed

People

(Reporter: jya, Assigned: jya)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

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.
In the above message, the reference is http://w3c.github.io/media-source/#end-of-stream-algorithm
Priority: -- → P2
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: nobody → jyavenard
Status: NEW → ASSIGNED
Attachment #8579733 - Flags: review?(matt.woodrow) → review+
https://hg.mozilla.org/mozilla-central/rev/43525f7e2fd9
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Flags: needinfo?(giles)
Depends on: 1128397
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?
Attachment #8579733 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Duplicate of this bug: 1131919
You need to log in before you can comment on or make changes to this bug.