We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e2ec981 commit 5725e19Copy full SHA for 5725e19
packages/xgplayer-hls/src/hls/index.js
@@ -520,7 +520,8 @@ export class Hls extends EventEmitter {
520
bInfo = this.bufferInfo(bInfo.nextStart || 0.5)
521
}
522
const bufferThroughout = Math.abs(bInfo.end - this.media.duration) < maxBufferThroughout
523
- if (bInfo.remaining >= config.preloadTime || bufferThroughout) {
+ // Only stop loading if we've buffered enough preload time or reached end AND all segments are loaded
524
+ if (bInfo.remaining >= config.preloadTime || (bufferThroughout && !nextSegment)) {
525
this._tryEos()
526
return
527
0 commit comments