Fall back to the first audio track when DefaultAudioStreamIndex is undefined (#1165)

Live TV omits audioStreamIndex causing DefaultAudioStreamIndex to be undefined,
which previously mapped to -1 and disabled audio in the MPV backend. Fall back
to the first embedded audio track so Live TV plays with audio.
This commit is contained in:
Fil authored and GitHub committed 2026-02-26 20:36:23 -05:00
1 parent 95fb02916c
commit b6c96133c6
1 file changed
+1 -1
+1 -1
View File
@@ -318,7 +318,7 @@
// Handle audio
const audioRelIndex = this._audioTrackIndexToSetOnPlaying != null && this._audioTrackIndexToSetOnPlaying >= 0
? this.getRelativeIndexByType(streams, this._audioTrackIndexToSetOnPlaying, 'Audio')
: -1;
: 1;
// Handle subtitle - check for external first
let subtitleParam;