From 8851472f55a5488fa7fde6f66b2f109038828e92 Mon Sep 17 00:00:00 2001 From: Rob Walch Date: Wed, 14 Apr 2021 13:09:13 -0400 Subject: [PATCH] Reset stream controller ENDED state after flushing the buffer for main audio-only streams Completes #3774 --- src/controller/stream-controller.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/controller/stream-controller.ts b/src/controller/stream-controller.ts index 3d6a46c6920..9cc7f920aa8 100644 --- a/src/controller/stream-controller.ts +++ b/src/controller/stream-controller.ts @@ -935,7 +935,10 @@ export default class StreamController event: Events.BUFFER_FLUSHED, { type }: BufferFlushedData ) { - if (type !== ElementaryStreamTypes.AUDIO) { + if ( + type !== ElementaryStreamTypes.AUDIO || + (this.audioOnly && !this.altAudio) + ) { const media = (type === ElementaryStreamTypes.VIDEO ? this.videoBuffer