fix: define options before setting secondary track
This commit is contained in:
parent
fe970743f1
commit
fb68bb1419
1 changed files with 4 additions and 4 deletions
|
@ -487,6 +487,10 @@ function tryRemoveElement(elem) {
|
|||
secondaryTrackValid = false;
|
||||
}
|
||||
|
||||
this.#audioTrackIndexToSetOnPlaying = options.playMethod === 'Transcode' ? null : options.mediaSource.DefaultAudioStreamIndex;
|
||||
|
||||
this._currentPlayOptions = options;
|
||||
|
||||
// Get the secondary track that has been set during this watch session
|
||||
let currentSecondaryTrackIndex = playbackManager.getSecondarySubtitleStreamIndex(this);
|
||||
|
||||
|
@ -503,10 +507,6 @@ function tryRemoveElement(elem) {
|
|||
}
|
||||
}
|
||||
|
||||
this.#audioTrackIndexToSetOnPlaying = options.playMethod === 'Transcode' ? null : options.mediaSource.DefaultAudioStreamIndex;
|
||||
|
||||
this._currentPlayOptions = options;
|
||||
|
||||
const crossOrigin = getCrossOriginValue(options.mediaSource);
|
||||
if (crossOrigin) {
|
||||
elem.crossOrigin = crossOrigin;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue