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

fix: pass player to playbackManager

This commit is contained in:
Ivan Schurawel 2023-02-10 13:52:53 -05:00 committed by Ivan Schurawel
parent 6c0a173361
commit c7f31c0fac

View file

@ -480,7 +480,7 @@ function tryRemoveElement(elem) {
secondaryTrackValid = false; secondaryTrackValid = false;
} }
// secondary track should not be shown if primary track is no longer a valid pair // secondary track should not be shown if primary track is no longer a valid pair
if (initialSubtitleStream && !playbackManager.trackHasSecondarySubtitleSupport(initialSubtitleStream)) { if (initialSubtitleStream && !playbackManager.trackHasSecondarySubtitleSupport(initialSubtitleStream, this)) {
secondaryTrackValid = false; secondaryTrackValid = false;
} }
} else { } else {
@ -488,11 +488,11 @@ function tryRemoveElement(elem) {
} }
// Get the secondary track that has been set during this watch session // Get the secondary track that has been set during this watch session
let currentSecondaryTrackIndex = playbackManager.getSecondarySubtitleStreamIndex(); let currentSecondaryTrackIndex = playbackManager.getSecondarySubtitleStreamIndex(this);
if (!secondaryTrackValid) { if (!secondaryTrackValid) {
currentSecondaryTrackIndex = -1; currentSecondaryTrackIndex = -1;
playbackManager.setSecondarySubtitleStreamIndex(currentSecondaryTrackIndex); playbackManager.setSecondarySubtitleStreamIndex(currentSecondaryTrackIndex, this);
} }
this.#secondarySubtitleTrackIndexToSetOnPlaying = currentSecondaryTrackIndex == null ? -1 : currentSecondaryTrackIndex; this.#secondarySubtitleTrackIndexToSetOnPlaying = currentSecondaryTrackIndex == null ? -1 : currentSecondaryTrackIndex;