fix document title
This commit is contained in:
parent
da88dc18e7
commit
3d89d3f26d
@ -132,6 +132,15 @@
|
||||
'progress',
|
||||
]),
|
||||
},
|
||||
watch: {
|
||||
track: {
|
||||
immediate: true,
|
||||
handler(track: any) {
|
||||
document.title = [track?.title, track?.artist || track?.album, 'Airsonic (refix)']
|
||||
.filter(x => !!x).join(' • ')
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapActions('player', [
|
||||
'playPause',
|
||||
|
@ -86,7 +86,6 @@ export const playerModule: Module<State, any> = {
|
||||
state.duration = track.duration
|
||||
const next = (index + 1) % state.queue.length
|
||||
audio.setBuffer(state.queue[next].url)
|
||||
document.title = `${track.title} • ${track.artist}`
|
||||
if (mediaSession) {
|
||||
mediaSession.metadata = new MediaMetadata({
|
||||
title: track.title,
|
||||
|
Loading…
x
Reference in New Issue
Block a user