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

Buffer is being cleared on period switch #4567

Open
adorian-alt opened this issue Sep 11, 2024 · 1 comment
Open

Buffer is being cleared on period switch #4567

adorian-alt opened this issue Sep 11, 2024 · 1 comment

Comments

@adorian-alt
Copy link

DashJs player is clearing buffer when switching between periods, which causes rebuffering.
We are using 1 minute periods and it causes us frequent rebuffering when user seeks.

For now we have diagnosed part which is causing this behaviour: function prepareOuterPeriodPlaybackSeeking() is pruning buffer on period switch (calls bufferController.pruneAllSafely()). Removing this line fixes issue, but introduces problem with not clearing buffer.

We have tried replacing bufferController.pruneAllSafely() with bufferController.clearBuffers() to clear buffer outside our settings range, but it causes issue with SourceBuffer limit:
This MediaSource has reached the limit of SourceBuffer objects it can handle. No additional SourceBuffer objects may be added.

Is there any way of avoiding this behaviour? It does not occur when seeking within period.

@dsilhavy
Copy link
Collaborator

This is an optimization that has not been implemented yet. As you pointed out, for we are pruning the buffer when seeking outside a period.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants