Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/controller/buffer-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,12 @@ transfer tracks: ${stringify(transferredTracks, (key, value) => (key === 'initSe
if (videoSb && sn !== 'initSegment') {
const partOrFrag = part || (frag as MediaFragment);
const blockedAudioAppend = this.blockedAudioAppend;
if (type === 'audio' && parent !== 'main' && !this.blockedAudioAppend) {
if (
type === 'audio' &&
parent !== 'main' &&
!this.blockedAudioAppend &&
!(videoTrack.ending || videoTrack.ended)
) {
const pStart = partOrFrag.start;
const pTime = pStart + partOrFrag.duration * 0.05;
const vbuffered = videoSb.buffered;
Expand Down Expand Up @@ -1077,6 +1082,9 @@ transfer tracks: ${stringify(transferredTracks, (key, value) => (key === 'initSe
this.tracksEnded();
this.hls.trigger(Events.BUFFERED_TO_END, undefined);
}
} else if (data.type === 'video') {
// Make sure pending audio appends are unblocked when video reaches end
this.unblockAudio();
}
}

Expand Down
Loading