chore: implement feedback

This commit is contained in:
Ivan Schurawel 2023-02-17 17:45:43 -05:00 committed by Ivan Schurawel
parent c74c0cddde
commit 89ec4cf9cf
2 changed files with 15 additions and 19 deletions

View file

@ -491,20 +491,16 @@ function tryRemoveElement(elem) {
this._currentPlayOptions = options;
// Get the secondary track that has been set during this watch session
let currentSecondaryTrackIndex = playbackManager.getSecondarySubtitleStreamIndex(this);
if (!secondaryTrackValid) {
currentSecondaryTrackIndex = -1;
playbackManager.setSecondarySubtitleStreamIndex(currentSecondaryTrackIndex, this);
}
this.#secondarySubtitleTrackIndexToSetOnPlaying = currentSecondaryTrackIndex == null ? -1 : currentSecondaryTrackIndex;
if (this.#secondarySubtitleTrackIndexToSetOnPlaying != null && this.#secondarySubtitleTrackIndexToSetOnPlaying >= 0) {
const initialSecondarySubtitleStream = options.mediaSource.MediaStreams[this.#secondarySubtitleTrackIndexToSetOnPlaying];
if (!initialSecondarySubtitleStream || initialSecondarySubtitleStream.DeliveryMethod !== 'External') {
this.#secondarySubtitleTrackIndexToSetOnPlaying = -1;
if (secondaryTrackValid) {
this.#secondarySubtitleTrackIndexToSetOnPlaying = options.mediaSource.DefaultSecondarySubtitleStreamIndex == null ? -1 : options.mediaSource.DefaultSecondarySubtitleStreamIndex;
if (this.#secondarySubtitleTrackIndexToSetOnPlaying != null && this.#secondarySubtitleTrackIndexToSetOnPlaying >= 0) {
const initialSecondarySubtitleStream = options.mediaSource.MediaStreams[this.#secondarySubtitleTrackIndexToSetOnPlaying];
if (!initialSecondarySubtitleStream || initialSecondarySubtitleStream.DeliveryMethod !== 'External') {
this.#secondarySubtitleTrackIndexToSetOnPlaying = -1;
}
}
} else {
this.#secondarySubtitleTrackIndexToSetOnPlaying = -1;
}
const crossOrigin = getCrossOriginValue(options.mediaSource);