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

fix: use correct stream, code safety, race conditions, update css

This commit is contained in:
Ivan Schurawel 2022-11-14 22:29:30 -05:00 committed by Ivan Schurawel
parent f3865f0dac
commit b1e397c4bc
4 changed files with 22 additions and 32 deletions

View file

@ -1068,13 +1068,13 @@ import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../../components
* - has more than 1 subtitle track
* - has valid secondary tracks
* - primary subtitle is not off
* - primary subtitle has support (index + 1 because `'Off'` is index 0 in `streams` array)
* - primary subtitle has support
*/
const currentTrackCanAddSecondarySubtitle = playbackManager.playerHasSecondarySubtitleSupport(player) &&
streams.length > 1 &&
secondaryStreams.length > 0 &&
currentIndex !== -1 &&
playbackManager.trackHasSecondarySubtitleSupport(streams[currentIndex + 1], player);
playbackManager.trackHasSecondarySubtitleSupport(playbackManager.getSubtitleStream(player, currentIndex), player);
if (currentTrackCanAddSecondarySubtitle) {
const secondarySubtitleMenuItem = {