Skip to content

Buffer is being cleared on period switch #4567

@dev-null-ptr

Description

@dev-null-ptr

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions