feat: add media session (wip)

This commit is contained in:
MAZE 2024-05-11 16:44:22 +03:30
parent cf4870b0d6
commit 34d3f07581

View File

@ -96,6 +96,7 @@ export function App() {
Howler.masterGain.connect(dest);
if (audioElement.current) {
audioElement.current.volume = 0;
audioElement.current.srcObject = dest.stream;
}
}, []);
@ -113,7 +114,6 @@ export function App() {
useEffect(() => {
if (isPlaying) {
audioElement.current?.play().then(() => {
audioElement.current!.volume = 1;
navigator.mediaSession.metadata = new MediaMetadata({
title: 'Moodist',
});