diff --git a/client/players/AudioTrack.js b/client/players/AudioTrack.js index da7ba92e..5768092d 100644 --- a/client/players/AudioTrack.js +++ b/client/players/AudioTrack.js @@ -14,6 +14,6 @@ export default class AudioTrack { if (process.env.NODE_ENV === 'development') { return `${process.env.serverUrl}${this.contentUrl}` } - return `${window.location.origin}/${this.contentUrl}` + return `${window.location.origin}${this.contentUrl}` } } \ No newline at end of file diff --git a/client/players/CastPlayer.js b/client/players/CastPlayer.js index 9fd517a7..9a6e715e 100644 --- a/client/players/CastPlayer.js +++ b/client/players/CastPlayer.js @@ -78,7 +78,7 @@ export default class CastPlayer extends EventEmitter { if (process.env.NODE_ENV === 'development') { this.coverUrl = coverImg } else { - this.coverUrl = `${window.location.origin}/${coverImg}` + this.coverUrl = `${window.location.origin}${coverImg}` } var request = buildCastLoadRequest(this.audiobook, this.coverUrl, this.audioTracks, this.currentTime, playWhenReady, this.defaultPlaybackRate) diff --git a/client/players/LocalPlayer.js b/client/players/LocalPlayer.js index 730f9bef..296f0940 100644 --- a/client/players/LocalPlayer.js +++ b/client/players/LocalPlayer.js @@ -99,7 +99,7 @@ export default class LocalPlayer extends EventEmitter { if (!Hls.isSupported()) { console.warn('HLS is not supported - fallback to using audio element') this.usingNativeplayer = true - this.player.src = this.currentTrack.fullContentUrl + this.player.src = this.currentTrack.contentUrl this.player.currentTime = this.currentTime return } @@ -115,7 +115,7 @@ export default class LocalPlayer extends EventEmitter { this.hlsInstance.attachMedia(this.player) this.hlsInstance.on(Hls.Events.MEDIA_ATTACHED, () => { - this.hlsInstance.loadSource(this.currentTrack.fullContentUrl) + this.hlsInstance.loadSource(this.currentTrack.contentUrl) this.hlsInstance.on(Hls.Events.MANIFEST_PARSED, () => { console.log('[HLS] Manifest Parsed') diff --git a/client/plugins/chromecast.js b/client/plugins/chromecast.js index b544a068..30287630 100644 --- a/client/plugins/chromecast.js +++ b/client/plugins/chromecast.js @@ -5,7 +5,7 @@ export default (ctx) => { return data.results.filter((b) => b.book.cover).map((ab) => { var coverUrl = ctx.$store.getters['audiobooks/getBookCoverSrc'](ab) if (process.env.NODE_ENV === 'development') return coverUrl - return `${window.location.origin}/${coverUrl}` + return `${window.location.origin}${coverUrl}` }) }).catch((error) => { console.error('failed to fetch books', error)