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

Clean-up whole buffer in get_time_ranges_for_content.ts to be safe #1283

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

peaBerberian
Copy link
Collaborator

When content become undecipherable the RxPlayer first tries to remove the corresponding data from the buffer. When it is not known when the corresponding undecipherable data is in the buffer (a normally rare occurence, but can theoretically happen), it previously removed everything that is currently known to be buffered.

This code now removes the whole buffer and doesn't limit itself at "what is known to be buffered" at that particular point in time:

  • There may be unfinished push operations still going on (should be very rare) in which case the data may not be removed in the previous behavior.
  • It simplifies things, especially with the still-on-draft WebWorker branch ([WIP] [v4] MULTI_THREAD feature relying on a WebWorker #1272) which may lead to the buffered data not obtainable synchronously (when MSE run in main thread, as that code would most likely run in the Worker).

When content become undecipherable the RxPlayer first tries to remove
the corresponding data from the buffer. When it is not known when the
corresponding undecipherable data is in the buffer (a normally rare
occurence, but can theoretically happen), it previously removed
everything that is currently known to be buffered.

This code now removes the whole buffer and doesn't limit itself at "what
is known to be buffered" at that particular point in time:
  - There may be unfinished push operations still going on (should be
    very rare) in which case the data may not be removed in the previous
    behavior.
  - It simplifies things, especially with the still-on-draft WebWorker
    branch (#1272) which may lead to the buffered data not obtainable
    synchronously (when MSE run in main thread, as that code would most
    likely run in the Worker).
@peaBerberian peaBerberian added this to the 3.32.0 milestone Sep 25, 2023
@peaBerberian peaBerberian merged commit a9a3759 into master Sep 26, 2023
3 checks passed
@peaBerberian peaBerberian mentioned this pull request Oct 2, 2023
@peaBerberian peaBerberian deleted the misc/clean-up-whole-range branch February 7, 2024 16:31
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

Successfully merging this pull request may close these issues.

1 participant