New issue
Advanced search Search tips

Issue 682797 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Seek when nothing buffered fails to flush decoder and seek the demuxer

Project Member Reported by wolenetz@chromium.org, Jan 19 2017

Issue description

See also comment #24 on internal b/33387059 for full repro case.

Steps:
1. Append 10 seconds of audio, begin playing it
2. At about 5 seconds, abort(), remove(0, buffered end), set timestampOffset=0, set currentTime = 0

[[ Observe in debug logs that Demuxer doesn't see the seek to time 0, unexpectedly. ]]

3. Append different audio for time [0,10]. tell the element to play() (this second play() shouldn't be required for repro)

[[ Observe a brief continuation of the originally appended, now removed audio (symptom of an unflushed-decoder, so ISTM the media renderer also never got the signal to seek to time 0 in step 2), followed by new media. Observe in debug logs that Demuxer is feeding media to the reader beginning where it left off earlier (not from time 0.) ]]

So it looks like, for MSE, a seek at least when nothing is currently buffered, is suppressed from signalling the media pipeline (chunkdemuxer and renderers) when it shouldn't be.





 
Status: WontFix (was: Assigned)
Ok. It's actually WAI.

The seek is suppressed per spec, when nothing is currently buffered and duration is +Infinity and the playback is using MSE.

endOfStream() can be used to fix the duration to not be +Infinity (though authors are discouraged from using endOfStream() unless it really is the end of the stream, due to interop issues (Safari endless updating state, or Chrome potential race to ended when undoing endOfStream() with a later API invocation.)
Or the web app can simply set the duration to 0 (or something finite) before seeking.
Or the web app can use the MSE setLiveSeekableRange API to let the engine know that seeking to time 0 is allowed when duration is +Infinity.

The latter is probably the most spec-compliant, though Safari and other implementations may not yet have a fully compliant setLiveSeekableRange API.

More detail: MSE extends HTMLMediaElement's calculation of HTMLMediaElement.seekable (see https://www.w3.org/TR/media-source/#htmlmediaelement-extensions), which is used in HTMLMediaElement seeking.

Sign in to add a comment