Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live stream with live seekable range and removal of buffered media around currentTime can cause currentTime to be outside of HTMLME.seekable #291

Open
wolenetz opened this issue Aug 4, 2021 · 1 comment
Milestone

Comments

@wolenetz
Copy link
Member

wolenetz commented Aug 4, 2021

Perhaps surprising to API users, there is a scenario where currentTime can become outside of the seekable range simply due to a change in what is buffered, when the duration is +Infinity and |live seekable range| is not empty.

Example:

  • HTMLMediaElement.buffered is { [3,6) [20,30} }
  • MediaSource.duration is +Infinity
  • MediaSource live seekable range is set to start=10, end=50
  • HTMLMediaElement.seekable is thus { [3, 50) }

Then, let's suppose a seek to and playback of media buffered at time [3,6) is done. currentTime begins to progress.
Then, let's suppose app removes [3,6). currentTime remains somewhere in that range, since it previously could not have progressed across the buffered range gap to the next buffered range that begins at time 20.

So, currentTime is somewhere in 3..6.
But HTMLMediaElement.seekable is now { [10, 50) }.

I think this scenario merits at least a non-normative note in the MSE-extended seekable steps.

Also, is this a normative issue with the spec? (Should .seekable also depend on currentTime in this scenario??)

@wolenetz wolenetz added this to the V2 milestone Aug 4, 2021
@wolenetz
Copy link
Member Author

wolenetz commented Aug 4, 2021

Credit to [email protected] for noting this potentially surprising scenario when updating Chromium's default media controls (https://chromium-review.googlesource.com/c/chromium/src/+/3042502)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant