LibWeb: Use MSE steps to update the media element's ready state

These steps are the best definition we have for how the ready state
should be set, and it seems to be reasonable to apply to plain file
playback as well.

Since our file demuxers are hardcoded to return the entire duration as
buffered, the ready state immediately progresses to HAVE_CURRENT_DATA.
This will probably change once we can check the demuxers for buffered
data.
This commit is contained in:
Zaggy1024
2026-03-25 16:53:23 -05:00
committed by Gregory Bertilson
parent 29db875b7f
commit f3832c0b36
Notes: github-actions[bot] 2026-04-01 07:57:28 +00:00
4 changed files with 103 additions and 24 deletions

View File

@@ -1,6 +1,6 @@
loadstart: readyState=0
durationchange: readyState=1 duration=12.043
loadedmetadata: readyState=1
loadeddata: readyState=4
durationchange: readyState=2 duration=12.043
loadedmetadata: readyState=2
loadeddata: readyState=2
canplay: readyState=4
canplaythrough: readyState=4