Merge pull request #19 from hoyon/set-page-title

Set page title to current track
This commit is contained in:
tamland 2020-11-29 12:06:42 +01:00 committed by GitHub
commit 9a68b816f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,6 +71,7 @@ export const playerModule: Module<State, any> = {
state.scrobbled = false
const track = state.queue[index]
audio.src = track.url
document.title = `${track.title}${track.artist}`
if (mediaSession) {
mediaSession.metadata = new MediaMetadata({
title: track.title,