New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 29 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Launch-OWP
Launch-Accessibility: ----
Launch-Exp-Leadership: ----
Launch-Leadership: ----
Launch-Legal: ----
Launch-M-Approved: ----
Launch-M-Target: 62-Dev , 62-Beta , 62-Stable-Exp , 62-Stable
Launch-Privacy: ----
Launch-Security: ----
Launch-Test: ----
Launch-UI: ----

Blocked on:
issue 624037



Sign in to add a comment
link

Issue 623698: API for customizing live MediaSource seekable range

Reported by wolenetz@chromium.org, Jun 27 2016 Project Member

Issue description

Change description:
Let MediaSource apps more effectively customize the HTMLMediaElement.seekable range logic by providing (or removing) a single seekable range that is union'ed with the current buffered ranges' to result in a single seekable range which fits both.

Without such support, apps need to fake a finite media duration to obtain reasonable seekable range results when nothing is buffered, and similarly apps need to fake a finite media duration to allow seeking beyond the current buffered ranges' end (perhaps to return to the live edge of the stream).

Previous discussion on this was done in  bug 461733  and  bug 546712 .
The MediaSource Spec [0] now includes a change [1] that supports this behavior. To keep the spec change simpler and less-breaking, existing HTMLMediaElement behavior for seekable is retained until/unless the new {set,clear}LiveSeekableRanges API is used on the MediaSource attached to that HTMLMediaElement, or if the media duration is finite, then the new API's logic is ignored.

[0] http://w3c.github.io/media-source/
[1] https://github.com/w3c/media-source/pull/92

Changes to API surface:
MediaSource.setLiveSeekableRange [2]
MediaSource.clearLiveSeekableRange [3]
HTMLMediaElement.seekable when attached to MediaSource with duration of positive infinity [4]

[2] http://w3c.github.io/media-source/#widl-MediaSource-setLiveSeekableRange-void-double-start-double-end
[3] http://w3c.github.io/media-source/#widl-MediaSource-clearLiveSeekableRange-void
[4] http://w3c.github.io/media-source/#htmlmediaelement-extensions

Links:
Public standards discussion:
https://github.com/w3c/media-source/issues/5
https://github.com/w3c/media-source/pull/92

Support in other browsers:
Internet Explorer: Planned (MSFT co-editor of MSE spec approved the change)
Firefox: Unknown
Safari: Unknown
 

Comment 1 by wolenetz@chromium.org, Jun 27 2016

Cc: renganat...@chromium.org wolenetz@chromium.org dalecur...@chromium.org phil...@opera.com joeyparrish@chromium.org
 Issue 546712  has been merged into this issue.

Comment 2 by wolenetz@chromium.org, Jun 27 2016

Cc: yini...@chromium.org chcunningham@chromium.org prabhur@chromium.org
 Issue 461733  has been merged into this issue.

Comment 3 by wolenetz@chromium.org, Jun 27 2016

Labels: MSE-compat MSEscrubbed

Comment 4 by wolenetz@chromium.org, Jun 28 2016

Blocking: 624037

Comment 5 by bugdroid1@chromium.org, Jun 28 2016

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b2f2d65c0068345ba8d5ee9462bab35463c94475

commit b2f2d65c0068345ba8d5ee9462bab35463c94475
Author: wolenetz <wolenetz@chromium.org>
Date: Tue Jun 28 20:18:53 2016

MSE: Experimental support for customizing live seekable range

Adds {set,clear}LiveSeekableRange methods to MediaSource IDL, with
implementations corresponding to the recent MSE spec addition of these
methods [1]. These methods are behind the MediaSourceExperimental
RuntimeEnabled flag until intent to ship is approved in a later
milestone.
Intent to implement thread is at [2].

[1] https://github.com/w3c/media-source/pull/92
[2] https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/2znjjhg7KiY

BUG= 623698 
TEST=passes upstream w3c/wpt mediasource-liveseekable.html test in PR at https://github.com/w3c/web-platform-tests/pull/3184
R=chcunningham@chromium.org,mlamouri@chromium.org

Review-Url: https://codereview.chromium.org/2105593002
Cr-Commit-Position: refs/heads/master@{#402519}

[modify] https://crrev.com/b2f2d65c0068345ba8d5ee9462bab35463c94475/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/b2f2d65c0068345ba8d5ee9462bab35463c94475/third_party/WebKit/Source/modules/mediasource/MediaSource.cpp
[modify] https://crrev.com/b2f2d65c0068345ba8d5ee9462bab35463c94475/third_party/WebKit/Source/modules/mediasource/MediaSource.h
[modify] https://crrev.com/b2f2d65c0068345ba8d5ee9462bab35463c94475/third_party/WebKit/Source/modules/mediasource/MediaSource.idl

Comment 6 by wolenetz@chromium.org, Jun 28 2016

Labels: -Pri-3 Pri-2

Comment 7 by foolip@chromium.org, Nov 11 2016

Cc: foolip@chromium.org

Comment 8 by foolip@chromium.org, Nov 11 2016

Cc: -phil...@opera.com

Comment 9 by wolenetz@chromium.org, Aug 8 2017

Cc: hbengali@chromium.org dah...@chromium.org
Labels: M-62
Intent to ship [a] (M-62) has received its third LGTM. I'll put together a CL that moves this API from behind the MediaSourceExperimental RuntimeEnabled flag to be always-enabled.

[a] https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/-LTXhyDzS_E

Comment 10 by wolenetz@chromium.org, Aug 8 2017

Cc: mlamouri@chromium.org
Labels: Launch-M-Target-62-Dev Launch-M-Target-62-Beta Launch-M-Target-62-Stable-Exp Launch-M-Target-62-Stable

Comment 11 by wolenetz@chromium.org, Aug 8 2017

Always-on CL is out for review at https://chromium-review.googlesource.com/c/606627

Comment 12 by bugdroid1@chromium.org, Aug 10 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5b985d6eadf58cd435e304c86cf34320e46c0bc9

commit 5b985d6eadf58cd435e304c86cf34320e46c0bc9
Author: Matt Wolenetz <wolenetz@chromium.org>
Date: Thu Aug 10 05:13:06 2017

MSE: Ship MediaSource.{set,clear}LiveSeekableRange

Moves this portion of the MSE API from behind the RuntimeEnabled flag
"MediaSourceExperimental".

BUG= 623698 

Intent to ship:

https: //groups.google.com/a/chromium.org/forum/#!topic/blink-dev/-LTXhyDzS_E
Change-Id: I094c4f27b678949060354bcb8bc6a1315c4d441e
Reviewed-on: https://chromium-review.googlesource.com/606627
Reviewed-by: Chrome Cunningham <chcunningham@chromium.org>
Reviewed-by: Rick Byers <rbyers@chromium.org>
Commit-Queue: Matthew Wolenetz <wolenetz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493246}
[modify] https://crrev.com/5b985d6eadf58cd435e304c86cf34320e46c0bc9/third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/5b985d6eadf58cd435e304c86cf34320e46c0bc9/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/5b985d6eadf58cd435e304c86cf34320e46c0bc9/third_party/WebKit/Source/modules/mediasource/MediaSource.idl

Comment 13 by wolenetz@chromium.org, Aug 10 2017

Status: Fixed (was: Assigned)
I've updated the chromestatus entry (https://www.chromestatus.com/feature/5671401352593408) to indicate this is "on by default" as of M62 (and Opera 49). Note that it is not behind any runtime flag (risk was deemed very low).

Comment 14 by wolenetz@chromium.org, Aug 10 2017

CC+=crouleau@ -- Caleb, w.r.t. test: we have some basic layout tests that have been testing this for about a year now with no known issues. Perhaps sync with dahlke@ to see if there's anything more "meaty" to test here (I think Jon was working on related controls work for live streams).

Comment 15 by wolenetz@chromium.org, Aug 10 2017

Cc: crouleau@chromium.org
cc+ crouleau@ for realz -- see #14.

Comment 16 by wolenetz@chromium.org, Sep 29 2017

Blocking: -624037

Comment 17 by wolenetz@chromium.org, Sep 29 2017

Blockedon: 624037

Comment 18 Deleted

Comment 19 by htle...@gmail.com, Dec 5

Is {set,clear}LiveSeekableRange API still enabled in Chrome 7X by default?

I'm trying to play live stream with dash.js. Dash.js use setLiveSeekableRange API to set the seekable range. setLiveSeekableRange function exist and do not throw error, but the seekable do not changed.
It is not working in below test:
https://googlechrome.github.io/samples/media/live-seekable-range.html

Customizing seekable range would be useful for live streaming.

Comment 20 by joeyparrish@google.com, Dec 5

I can confirm that I do not see any changes to the native controls with setLiveSeekableRange on Chrome 70 on ChromeOS.  (Tested with the Shaka Player demo, the "show native controls" checkbox on the demo, and the JS console to call the method.)

Comment 21 by crouleau@chromium.org, Dec 5

Cc: -yini...@chromium.org -prabhur@chromium.org -dah...@chromium.org -crouleau@chromium.org -renganat...@chromium.org
Removing people no longer on this team.

Comment 22 by wolenetz@google.com, Dec 5

@#19, yes, it's shipped and working. I re-verified manually just now thaat Chrome 0.0.3538.110 (Official Build) (64-bit) on Linux works correctly w.r.t. https://googlechrome.github.io/samples/media/live-seekable-range.html

Of particular note, the range set by setLiveSeekableRange is *ignored* if the duration is not +Infinity. And even if the duration is +Infinity, the range set by setLiveSeekableRange does not truncate existing buffered range at the front or back -- but it does allow tighter seekable range than otherwise (e.g., fetch and buffer { [3,6) }, set duration to +Infinity => seekable is [0, 6). setLiveSeekableRange(1,4) => seekable becomes [1, 6). setLiveSeekableRange(40,42) => seekable becomes [3, 42). clearLiveSeekable or change duration to finite positive value => seekable reverts to normal [0, 6).

@#20: The lack of default controls reflecting the seekable range when MSE is attached, duration is +Infinity, and a live seekable range has been set, is bug 771706.

Comment 23 by wolenetz@google.com, Dec 5

(@#22, the start of the version string was missing: I meant "70.0.3538.110 (Official Build) (64-bit)")

Comment 24 by htle...@gmail.com, Dec 21

Thank you for clarify that setLiveSeekableRange is ignored if duration is not +Infinity. 
I mixed up 2 bugs (the lack of default controls and the incorrect seekable range of dash.js due to the duration is not Infinity) and thought this API is not working. Sorry for disturbing you.

Sign in to add a comment