Update MSE duration change, endOfStream, and buffered behavior to match spec |
|
Issue descriptionSpec change https://github.com/w3c/media-source/pull/154 is expected to land soon. Chrome is already not compliant with either the before or after #154 state. Assuming #154 lands, Chrome MSE needs: * updated endOfStream behavior around calculation of highest end time (using highest track buffer range end time, not highest intersected track buffer range (SourceBuffer.buffered) end time, across all SourceBuffers. * updated duration change algorithm behavior, which "bumps up" the desired duration to a similarly calculated highest end time. * test that: 1) If current duration is D, highest track buffer range end time E<D: a) setting duration attribute to D is no-op (with no 'durationchange') b) setting duration attribute to E results with duration==E and 'durationchange' event enqueued c) setting duration attribute to X<E, X > highest buffered PTS, results with duration==E and 'durationchange' fired 2) If current duration is D, highest track buffer range end time E==D: a) setting duration attribute to D is no-op (with no 'durationchange') b) setting duration attribute to X < D, X > highest buffered PTS, results with duration "bumped back up" to D *and* 'durationchange' event fired Note: 1c and 2b are different than before #154 and also different than current Chromium implementation. Note also that the current capping of the highest buffered range end time to be duration *should* be unnecessary once implementation matching #154 lands in Chromium; suggest that such capping be replaced with DCHECKs.
,
Dec 1 2016
See also case 2 in issue 604353 comment 14. I'm also wondering: what if currentTime progressed into a buffered region, that region was then remove()'ed, and endOfStream() resulted in reducing duration below where currentTime had reached: what should happen in this case spec-wise?
,
Dec 1 2016
@#2, there's no ambiguity actually: per https://www.w3.org/TR/html51/semantics-embedded-content.html#durationChange, a seek to the new duration should occur.
,
Aug 8 2017
See the TODO (in CL CR now): https://chromium-review.googlesource.com/c/606683/1/third_party/WebKit/Source/modules/mediasource/MediaSource.cpp#742 Such refactoring would best be done as part of fixing this bug IMHO. |
|
►
Sign in to add a comment |
|
Comment 1 by wolenetz@chromium.org
, Sep 7 2016