Stall threshold for low latency and handle stuck video #100
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a separate low latency stall threshold, as already in use in Dash.js v5.0.1 #4689.
Without this PR, the stall threshold in low latency mode is fixed at 0. This PR adds a configurable setting that defaults to
0.3s
matching the regularstallThreshold
value.This reduces the number of occurrences of buffer underruns on the MSE video source buffer, which can trigger a video freezing bug in chrome versions pre 137.0.7146.0.
The addition of a low latency stall threshold only goes so far in preventing occurrences of video freezing bug above. To combat this, a new setting
streaming.buffer.handleVideoFramesNotAdvancing
has been added. Enabling it (changing it to a positive integer) uses the Video Quality API on the underlying video element to determine if the number of total frames has stopped advancing. If the criteria for detecting a video freeze are met, then video element time is set to current time, which corrects this issue.Currently, a warning message is raised every time this issue is believed to have occurred. The number in set enabling
handleVideoFramesNotAdvancing
indicates the number of consecutive occurrences that should occur before attempting to set current time in an attempt to handle the issue. This is intended to allow the sensitivity of the mechanism to be controlled.