Skip to content

Commit

Permalink
fix: prevent wrapping in resetMainLoaderReplaceSegments (#1439)
Browse files Browse the repository at this point in the history
  • Loading branch information
pulsejet authored Oct 30, 2023
1 parent beccfa1 commit 719b7f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/playlist-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ export class PlaylistController extends videojs.EventTarget {
*/
resetMainLoaderReplaceSegments() {
const buffered = this.tech_.buffered();
const bufferedEnd = buffered.end(buffered.length - 1);
const bufferedEnd = buffered.length ? buffered.end(buffered.length - 1) : 0;

// Set the replace segments flag to the buffered end, this forces fetchAtBuffer
// on the main loader to remain, false after the resetLoader call, until we have
Expand Down

0 comments on commit 719b7f4

Please sign in to comment.