feat: add media session (wip)

This commit is contained in:
MAZE 2024-05-11 16:38:26 +03:30
parent 9f0a28d930
commit cf4870b0d6

View File

@ -113,6 +113,7 @@ export function App() {
useEffect(() => { useEffect(() => {
if (isPlaying) { if (isPlaying) {
audioElement.current?.play().then(() => { audioElement.current?.play().then(() => {
audioElement.current!.volume = 1;
navigator.mediaSession.metadata = new MediaMetadata({ navigator.mediaSession.metadata = new MediaMetadata({
title: 'Moodist', title: 'Moodist',
}); });