htmlmediaelement: Support seek requests for non seekable fetch context#37264
Merged
jdm merged 1 commit intoservo:mainfrom Jun 6, 2025
Merged
htmlmediaelement: Support seek requests for non seekable fetch context#37264jdm merged 1 commit intoservo:mainfrom
jdm merged 1 commit intoservo:mainfrom
Conversation
Contributor
Author
|
NOTE: The "Content-Length" header for data URL response change is optional and could be remove from PR. |
jdm
approved these changes
Jun 5, 2025
Member
jdm
left a comment
There was a problem hiding this comment.
Nice solution! Let's merge this and revisit the Content-Length once we reach a conclusion in the linked issue.
Member
|
There are some unit tests that are now failing that need to be investigated. |
13699c0 to
043cf1e
Compare
Contributor
Author
|
Change to data:// URL processing ("Content-Length" header) didn't pass unit tests I removed this change from PR and proposed another change (post configuration of the total stream size) for non seekable fetch context. |
According to specification the data:// URL protocol doesn't support range request so be able make any seek request to required content position let's allow for non seekable fetch context discard fetched content bytes until seek offset. https://fetch.spec.whatwg.org/#scheme-fetch Some scheme URLs (like data:// URL) doesn't expose "Content-Length" header in response so the total expected size of the stream is unknown and it causes some additional seek request (SeekData) from the media player. Try to post configure stream size after we reached fetch EOS response. Related source code which breaks WPT tests: tests/wpt/tests/html/canvas/element/manual/imagebitmap/common.sub.js#L56-L78 Testing: Improvements in the following tests: - html/canvas/element/manual/imagebitmap/createImageBitmap* - mixed-content/gen/top.***/opt-in/video-tag.https.html - webgl/tests/conformance/textures/misc/texture-srgb-upload.html Fixes: servo#32645 Fixes: servo#32745 Fixes: servo#34119 Fixes: servo#34120 Fixes: servo#34151 Signed-off-by: Andrei Volykhin <[email protected]>
043cf1e to
0706594
Compare
Contributor
Author
|
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
According to specification the data:// URL protocol doesn't support range request
so be able make any seek request to required content position let's allow
for non seekable fetch context discard fetched content bytes until seek offset.
https://fetch.spec.whatwg.org/#scheme-fetch
Some scheme URLs (like data:// URL) doesn't expose "Content-Length" header in response
so the total expected size of the stream is unknown and it causes some additional
seek request (SeekData) from the media player. Try to post configure stream size
after we reached fetch EOS response.
Related source code which breaks WPT tests:
tests/wpt/tests/html/canvas/element/manual/imagebitmap/common.sub.js#L56-L78
Testing: Improvements in the following tests:
Fixes: #32645
Fixes: #32745
Fixes: #34119
Fixes: #34120
Fixes: #34151