feat(web): mount useEventsDispatcher() in root layout
Single mount point alongside useMediaSession. Once called, the dispatcher's \$effect watchers run for the lifetime of the SPA.
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
player
|
||||
} from '$lib/player/store.svelte';
|
||||
import { useMediaSession } from '$lib/player/mediaSession.svelte';
|
||||
import { useEventsDispatcher } from '$lib/player/events.svelte';
|
||||
|
||||
let { children } = $props<{ children: import('svelte').Snippet }>();
|
||||
let audioEl: HTMLAudioElement | undefined = $state();
|
||||
@@ -64,6 +65,7 @@
|
||||
});
|
||||
|
||||
useMediaSession();
|
||||
useEventsDispatcher();
|
||||
</script>
|
||||
|
||||
<audio
|
||||
|
||||
Reference in New Issue
Block a user