RESOLVED FIXED 254198
[MSE] readyState should change back to HAVE_METADATA when removing sample at current playtime
https://bugs.webkit.org/show_bug.cgi?id=254198
Summary [MSE] readyState should change back to HAVE_METADATA when removing sample at ...
Jean-Yves Avenard [:jya]
Reported 2023-03-20 22:39:03 PDT
This is similar to the side fix made in https://bugs.webkit.org/show_bug.cgi?id=254136 where we ensured that the readyState was updated before we fired `updateend`. Per spec in the coded frame removal [1] step5: ``` If this object is in activeSourceBuffers, the current playback position is greater than or equal to start and less than the remove end timestamp, and HTMLMediaElement.readyState is greater than HAVE_METADATA, then set the HTMLMediaElement.readyState attribute to HAVE_METADATA and stall playback. ``` This occurs before we return from the coded frame remove algorithm, so readyState should change before we fire the `updateend` event. Note that there's a similar code flow for when evicting data. However due to how the MediaPlayer works in the GPU process this isn't currently achievable as the readyState change require a back and forth from CP to GPU Process, incompatible with the synchronous nature of the prepare append algorithm [2]. However, in practice it doesn't matter, as the eviction algorithm is designed in such a way that it will never evict data at the current time, and as such, the readyState can never move back to HAVE_METADATA [1] https://w3c.github.io/media-source/#sourcebuffer-coded-frame-removal [2] https://w3c.github.io/media-source/#sourcebuffer-prepare-append
Attachments
Radar WebKit Bug Importer
Comment 1 2023-03-20 22:45:36 PDT
Jean-Yves Avenard [:jya]
Comment 2 2023-03-21 01:41:38 PDT
EWS
Comment 3 2023-03-22 03:31:07 PDT
Committed 261955@main (20053bdeedfd): <https://commits.webkit.org/261955@main> Reviewed commits have been landed. Closing PR #11751 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.