Skip to content

Commit

Permalink
feat: add media session (wip)
Browse files Browse the repository at this point in the history
  • Loading branch information
remvze committed May 11, 2024
1 parent cf4870b commit 34d3f07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export function App() {
Howler.masterGain.connect(dest);

if (audioElement.current) {
audioElement.current.volume = 0;
audioElement.current.srcObject = dest.stream;
}
}, []);
Expand All @@ -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',
});
Expand Down

0 comments on commit 34d3f07

Please sign in to comment.