Add position state to now playing
This commit is contained in:
parent
ed4227c1b5
commit
3a1482932f
|
@ -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", {
|
||||
|
|
Loading…
Reference in New Issue