mirror of
https://github.com/remvze/moodist.git
synced 2025-09-29 15:30:49 -04:00
feat: add media session (wip)
This commit is contained in:
parent
cf4870b0d6
commit
34d3f07581
@ -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',
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user