File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -867,7 +867,7 @@ export default class StreamController
867867 ) {
868868 const hls = this . hls ;
869869 // if any URL found on new audio track, it is an alternate audio track
870- const fromAltAudio = this . altAudio === AlternateAudio . SWITCHED ;
870+ const fromAltAudio = this . altAudio !== AlternateAudio . DISABLED ;
871871 const altAudio = useAlternateAudio ( data . url , hls ) ;
872872 // if we switch on main audio, ensure that main fragment scheduling is synced with media.buffered
873873 // don't do anything if we switch to alt audio: audio stream controller is handling it.
@@ -895,6 +895,7 @@ export default class StreamController
895895 }
896896 // If switching from alt to main audio, flush all audio and trigger track switched
897897 if ( fromAltAudio ) {
898+ this . altAudio = AlternateAudio . DISABLED ;
898899 this . fragmentTracker . removeAllFragments ( ) ;
899900 hls . once ( Events . BUFFER_FLUSHED , ( ) => {
900901 if ( ! this . hls as any ) {
You can’t perform that action at this time.
0 commit comments