Fix volume gain not being applied immediately

environments/review-docs-pre-c-zs4ui8/deployments/15563
wvffle 2022-11-16 07:04:02 +00:00
rodzic a80b1fe931
commit 07b068a342
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -59,7 +59,7 @@ export const usePlayer = createGlobalState(() => {
const lastVolume = useStorage('player:last-volume', 0.7)
const volume: Ref<number> = useStorage('player:volume', 0.7)
watch(volume, (gain) => setGain(gain))
watch(volume, (gain) => setGain(gain), { immediate: true })
const mute = () => {
if (volume.value > 0) {