Fix volume gain not being applied immediately
This commit is contained in:
parent
a80b1fe931
commit
07b068a342
1 changed files with 1 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue