Add position state to now playing

This commit is contained in:
John Castberg 2024-03-09 00:30:18 -08:00
parent ed4227c1b5
commit 3a1482932f
No known key found for this signature in database
GPG Key ID: F60E197FB537F589
1 changed files with 5 additions and 0 deletions

View File

@ -46,6 +46,11 @@ export default function useNowPlaying(props) {
{src: np_new.now_playing.song.art}
]
});
navigator.mediaSession.setPositionState({
duration: np_new.now_playing.duration,
position: np_new.now_playing.elapsed,
});
}
document.dispatchEvent(new CustomEvent("now-playing", {