Update web player track index to fallback to 1

This commit is contained in:
advplyr 2025-07-22 14:46:31 -05:00
parent 82cddde15f
commit a53a96ecf5

View file

@ -255,7 +255,7 @@ class AbsAudioPlayerWeb extends WebPlugin {
if (this.currentTrack.contentUrl?.startsWith('/hls')) {
sessionTrackUrl = this.currentTrack.contentUrl
} else {
sessionTrackUrl = `/public/session/${this.playbackSession.id}/track/${this.currentTrack.index}`
sessionTrackUrl = `/public/session/${this.playbackSession.id}/track/${this.currentTrack.index || 1}`
}
this.player.src = `${serverHost}${sessionTrackUrl}`