Skip to content

Commit

Permalink
Merge pull request #6224 from viown/fix-undefined-sub-stream-index
Browse files Browse the repository at this point in the history
  • Loading branch information
thornbill authored Oct 20, 2024
2 parents 5e5b3ab + 05ce167 commit 1ed7ce8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/playback/playbackmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -2641,7 +2641,9 @@ export class PlaybackManager {
}

if (mediaSource.DefaultSubtitleStreamIndex == null || mediaSource.DefaultSubtitleStreamIndex < 0) {
mediaSource.DefaultSubtitleStreamIndex = mediaSource.DefaultSecondarySubtitleStreamIndex;
if (mediaSource.DefaultSecondarySubtitleStreamIndex != null) {
mediaSource.DefaultSubtitleStreamIndex = mediaSource.DefaultSecondarySubtitleStreamIndex;
}
mediaSource.DefaultSecondarySubtitleStreamIndex = -1;
}

Expand Down

0 comments on commit 1ed7ce8

Please sign in to comment.