mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Update src/controllers/playback/video/index.js
Co-authored-by: viown <48097677+viown@users.noreply.github.com>
This commit is contained in:
parent
8bf4542957
commit
3f60e7df4c
1 changed files with 2 additions and 6 deletions
|
@ -1183,12 +1183,8 @@ export default function (view) {
|
|||
const defaultIndex = player?.streamInfo?.mediaSource?.DefaultSubtitleStreamIndex ?? -1;
|
||||
|
||||
if (currentIndex === -1 && streams.length > 0) {
|
||||
if (defaultIndex > -1) {
|
||||
playbackManager.setSubtitleStreamIndex(defaultIndex, player);
|
||||
} else {
|
||||
const firstSubtitleIndex = streams[0].Index;
|
||||
playbackManager.setSubtitleStreamIndex(firstSubtitleIndex, player);
|
||||
}
|
||||
const subtitleIndex = defaultIndex != -1 ? defaultIndex : streams[0].Index;
|
||||
playbackManager.setSubtitleStreamIndex(subtitleIndex, player);
|
||||
} else {
|
||||
playbackManager.setSubtitleStreamIndex(-1, player);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue