WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
265023
[MSE] Change canPlayThroughRange to check buffered data at the current position
https://bugs.webkit.org/show_bug.cgi?id=265023
Summary
[MSE] Change canPlayThroughRange to check buffered data at the current position
Enrique Ocaña
Reported
2023-11-17 05:02:35 PST
The current SourceBuffer::canPlayThroughRange() implementation is based on average buffering rate. While this approach makes sense in a context of continuous playback, where the JS app is always trying to append data, this isn't always the case in some real life apps. For instance, an app may append a lot of data on page load (enough for sustained playback), then decide to wait for whatever reason, and then start playback. In those circumstances, wait would cause the average buffering rate to be artificially low. There are more examples of the kind of problems that a time-based/average buffering rate-based approach may cause. See:
https://github.com/WebPlatformForEmbedded/WPEWebKit/issues/928
One solution would be to use Firefox strategy to this problem[1]: if the ranges to be checked have 3 seconds or more buffered after the current position, we consider that sustained playback is possible. This solves the issues seen in some real world apps. If this approach causes any problems on non-WPE/WebKitGTK ports, a possible improvement might be to let the platform implementation decide the desired strategy in some way. For the mentioned platforms it's important to get rid of the problems that the time-based implementation causes. [1]
https://github.com/mozilla/gecko-dev/blob/master/dom/media/mediasource/MediaSourceDecoder.cpp#L320
Attachments
Add attachment
proposed patch, testcase, etc.
Enrique Ocaña
Comment 1
2023-11-17 05:31:24 PST
Pull request:
https://github.com/WebKit/WebKit/pull/20663
Radar WebKit Bug Importer
Comment 2
2023-11-24 05:03:18 PST
<
rdar://problem/118770174
>
EWS
Comment 3
2024-01-08 07:49:19 PST
Committed
272762@main
(c55cda1034c1): <
https://commits.webkit.org/272762@main
> Reviewed commits have been landed. Closing PR #20663 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug