You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When this happens, the bufferLevel is large and the _shouldBuffer method is constantly false.
// StreamProcessor.js, 296L
bufferController.prepareForPlaybackSeek()
.then(() => {
// Clear the buffer. We need to prune everything which is not in the target interval.
const clearRanges = bufferController.getAllRangesWithSafetyFactor(e.seekTime); // empty
// When everything has been pruned go on
return bufferController.clearBuffers(clearRanges);
})
If ranges is empty, clearNextRange is not called.
Then the internal _onRemoved will not be called, nor will updateBufferLevel.
Because the bufferLevel hasn't been updated, _shouldBuffer becomes false, which means we won't receive the next buffer.
// BUfferController.js, L961
function clearBuffers(ranges) {
return new Promise((resolve, reject) => {
if (!ranges || !sourceBufferSink || ranges.length === 0) {
_updateBufferLevel(); // Update bufferLevel
resolve();
return;
}
I think changing the code as above should fix it.
However, there may be side effects, so I'd like you to review them.
Console output
Debug.js:169 [12734][PlaybackController] Requesting seek to time: 51
Debug.js:169 [12739][PlaybackController] Seeking to: 51
Debug.js:169 [12739][FragmentModel][video] abort requests
Debug.js:169 [12740][FragmentModel][audio] abort requests
Debug.js:169 [12740][SourceBufferSink][video] Updated append window for video. Set start to 0 and end to 634.576
Debug.js:169 [12740][SourceBufferSink][audio] Updated append window for audio. Set start to 0 and end to 634.576
Expected behavior
I want it to work well in situations like the above.
The text was updated successfully, but these errors were encountered:
Environment
Steps to reproduce
Observed behavior
When this happens, the bufferLevel is large and the _shouldBuffer method is constantly false.
For the same reason as the code above, clearRanges will be empty.
If ranges is empty, clearNextRange is not called.
Then the internal _onRemoved will not be called, nor will updateBufferLevel.
Because the bufferLevel hasn't been updated, _shouldBuffer becomes false, which means we won't receive the next buffer.
I think changing the code as above should fix it.
However, there may be side effects, so I'd like you to review them.
Console output
Expected behavior
I want it to work well in situations like the above.
The text was updated successfully, but these errors were encountered: