Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Describe eviction policy #341

Open
marcoscaceres opened this issue Dec 5, 2023 · 1 comment
Open

Describe eviction policy #341

marcoscaceres opened this issue Dec 5, 2023 · 1 comment

Comments

@marcoscaceres
Copy link
Member

marcoscaceres commented Dec 5, 2023

It would be great if the spec could describe how the eviction policy works. This would help developers with understanding that they can't rely on one browser's eviction policy matching any other browser... or that it may change depending on what hardware you are on.

We should provide "best practice" guidance based on existing implementation experience (and what not to do to shoot yourself in the foot!).

@marcoscaceres
Copy link
Member Author

More context based on what @wolenetz wrote in #329:

The assumption that all media is fetched in order of the presentation is incorrect. One important exception I've seen is variation in seeking scenarios: not all apps initiate seek first and then append at the seek target time; some append at the seek target first, and then seek there. Therefore, conserving both the most recently appended bytes as well as the bytes around the playhead are both important to reduce stalls and rebuffering. To promote improved interoperability, I previously documented the rather complicated strategy used by Chromium as the "normal" evictionPolicy in this proposal: https://github.com/wicg/media-source/blob/mse-eviction-policies/mse-eviction-policies-explainer.md#normal. "normal" is probably the wrong word, my apologies. I used it in the context of some new evictionPolicies to support things like infinite-GOP length buffering seek-free playback with reduced I-frame bitrate bursts, for example.

In short, the normative text in this PR currently says the strategy is (actually, implied must) be to preserve uninterrupted forward playback from currentTime, but then in a non-normative note it says the strategy may be implementation-defined instead. This can be confusing. Especially when non-trivial usage of MSE is by players that append to a seek target time before issuing the seek to that time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant