From 07b068a342a8820563a907475e48ef7f3bc6b224 Mon Sep 17 00:00:00 2001 From: wvffle Date: Wed, 16 Nov 2022 07:04:02 +0000 Subject: [PATCH] Fix volume gain not being applied immediately --- front/src/composables/audio/player.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/src/composables/audio/player.ts b/front/src/composables/audio/player.ts index 844ef8cb4..c01b6561e 100644 --- a/front/src/composables/audio/player.ts +++ b/front/src/composables/audio/player.ts @@ -59,7 +59,7 @@ export const usePlayer = createGlobalState(() => { const lastVolume = useStorage('player:last-volume', 0.7) const volume: Ref = useStorage('player:volume', 0.7) - watch(volume, (gain) => setGain(gain)) + watch(volume, (gain) => setGain(gain), { immediate: true }) const mute = () => { if (volume.value > 0) {