Fix embedded player
This commit is contained in:
parent
132974959b
commit
50fd01de1a
|
@ -54,8 +54,8 @@
|
||||||
const getTracksUrl = () => type === 'track'
|
const getTracksUrl = () => type === 'track'
|
||||||
? `${baseUrl}/api/v1/tracks/${id}`
|
? `${baseUrl}/api/v1/tracks/${id}`
|
||||||
: type === 'playlist'
|
: type === 'playlist'
|
||||||
? ${baseUrl}`/api/v1/playlists/${id}/tracks/`
|
? `${baseUrl}/api/v1/playlists/${id}/tracks/`
|
||||||
: ${baseUrl}`/api/v1/tracks/`
|
: `${baseUrl}/api/v1/tracks/`
|
||||||
|
|
||||||
const getAudioSources = (uploads) => {
|
const getAudioSources = (uploads) => {
|
||||||
const sources = uploads
|
const sources = uploads
|
||||||
|
@ -65,9 +65,9 @@
|
||||||
// NOTE: For backwards compatibilty, prepend the baseUrl if listen_url starts with a slash
|
// NOTE: For backwards compatibilty, prepend the baseUrl if listen_url starts with a slash
|
||||||
.map(source => ({
|
.map(source => ({
|
||||||
...source,
|
...source,
|
||||||
listen_url: listen_url[0] === '/'
|
listen_url: source.listen_url[0] === '/'
|
||||||
? `${baseUrl}${listen_url}`
|
? `${baseUrl}${source.listen_url}`
|
||||||
: listen_url
|
: source.listen_url
|
||||||
}))
|
}))
|
||||||
|
|
||||||
// NOTE: Add a transcoded MP3 src at the end for browsers
|
// NOTE: Add a transcoded MP3 src at the end for browsers
|
||||||
|
|
Loading…
Reference in New Issue