W3C home > Mailing lists > Public > public-html-media@w3.org > September 2021

[media-source] Standardize expectations around endOfStream followed by later re-opening of MediaSource (#299)

From: Matt Wolenetz via GitHub <sysbot+gh@w3.org>
Date: Thu, 23 Sep 2021 20:58:28 +0000
To: public-html-media@w3.org
Message-ID: <issues.opened-1005839933-1632430706-sysbot+gh@w3.org>
wolenetz has just created a new issue for https://github.com/w3c/media-source:

== Standardize expectations around endOfStream followed by later re-opening of MediaSource ==
endOfStream() is a useful mechanism for apps to let the HTMLMediaElement know when playback has reached the end of the media.

However, there are complications involved with the MSE spec enabling apps to call endOfStream(), and subsequently re-open the MediaSource (various operations can re-open an 'ended' MediaSource, such as doing an appendBuffer() to one of its SourceBuffers).

Primarily, the complications occur due to varying media decoding and rendering pipeline depths in implementations:

If the endOfStream() occurs at a point when all media for a particular track buffer has been fed to the decoder already, and the implementation, following the MSE spec, executes "Notify the media element that it now has all of the media data", then what should happen later upon a re-opening of the MediaSource?

Chromium, upon such a re-opening, does not reactivate a track's decoder/renderer pipeline to potentially resume from where it was previously *if* it had previously reached the end. Since the media element already had all of its media data, and had potentially finished rendering it, is not reactivating the decoders/renderer pipeline for previously finished media correct upon MediaSource re-opening? (For instance, if the HTMLMediaElement had completely reached 'ended', but then the MediaSource were re-opened with more media appended to the end, Chromium doesn't automatically resume playback).

This bug tracks discussing if this behavior is correct. It can be a source of unexpected behavior, especially if implementations differ on their interpretation of what to do upon re-opening the MediaSource (Safari, IIRC may do this differently.)

Please view or discuss this issue at https://github.com/w3c/media-source/issues/299 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 23 September 2021 20:58:30 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 23 September 2021 20:58:31 UTC