Add new api endpoint for direct playing audio files using session id #4259

This commit is contained in:
advplyr 2025-05-05 17:00:43 -05:00
parent 45987ffd63
commit 336de49d8d
5 changed files with 62 additions and 13 deletions

View file

@ -37,9 +37,6 @@ export default class PlayerHandler {
get isPlayingLocalItem() {
return this.libraryItem && this.player instanceof LocalAudioPlayer
}
get userToken() {
return this.ctx.$store.getters['user/getToken']
}
get playerPlaying() {
return this.playerState === 'PLAYING'
}
@ -226,7 +223,7 @@ export default class PlayerHandler {
console.log('[PlayerHandler] Preparing Session', session)
var audioTracks = session.audioTracks.map((at) => new AudioTrack(at, this.userToken, this.ctx.$config.routerBasePath))
var audioTracks = session.audioTracks.map((at) => new AudioTrack(at, session.id, this.ctx.$config.routerBasePath))
this.ctx.playerLoading = true
this.isHlsTranscode = true