1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

fix: ensure secondary index is valid

This commit is contained in:
Ivan Schurawel 2023-02-19 12:50:12 -05:00 committed by Ivan Schurawel
parent 4ca927991f
commit 3c0ace3386

View file

@ -2387,7 +2387,11 @@ class PlaybackManager {
console.debug(`AutoSet ${streamType} - Using ${bestStreamIndex} score ${bestStreamScore}.`);
if (streamType == 'Subtitle') {
if (isSecondarySubtitle) {
if (self.trackHasSecondarySubtitleSupport(mediaSource.MediaStreams[bestStreamIndex])) {
mediaSource.DefaultSecondarySubtitleStreamIndex = bestStreamIndex;
} else {
mediaSource.DefaultSecondarySubtitleStreamIndex = -1;
}
} else {
mediaSource.DefaultSubtitleStreamIndex = bestStreamIndex;
}