diff --git a/src/components/app/app.tsx b/src/components/app/app.tsx
index 29fa3b7..713e24a 100644
--- a/src/components/app/app.tsx
+++ b/src/components/app/app.tsx
@@ -18,7 +18,6 @@ import { FADE_OUT } from '@/constants/events';
import type { Sound } from '@/data/types';
import { subscribe } from '@/lib/event';
-import { useMediaSession } from '@/hooks/use-media-session';
export function App() {
const categories = useMemo(() => sounds.categories, []);
@@ -86,30 +85,18 @@ export function App() {
return [...favorites, ...categories];
}, [favoriteSounds, categories]);
- const audio = useMediaSession();
-
return (
- <>
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
- >
+
+
+
+
);
}
diff --git a/src/hooks/use-media-session.ts b/src/hooks/use-media-session.ts
deleted file mode 100644
index 08ebb11..0000000
--- a/src/hooks/use-media-session.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import { useEffect, useRef } from 'react';
-
-import { useSoundStore } from '@/store';
-
-export function useMediaSession() {
- const ref = useRef(null);
-
- const isPlaying = useSoundStore(state => state.isPlaying);
-
- useEffect(() => {
- if (ref.current) {
- ref.current.addEventListener('play', () => {
- console.log('hi');
- navigator.mediaSession.metadata = new MediaMetadata({
- title: 'Moodist',
- });
-
- navigator.mediaSession.playbackState = 'playing';
- });
-
- ref.current.addEventListener('pause', () => {
- navigator.mediaSession.playbackState = 'paused';
- });
- }
- }, []);
-
- useEffect(() => {
- if (isPlaying) {
- ref.current?.play();
- } else {
- ref.current?.pause();
- }
- }, [isPlaying]);
-
- return ref;
-}