mirror of
https://github.com/isledecomp/isle.pizza.git
synced 2026-02-28 22:07:39 +00:00
Fix issue on Safari: audio not playing on first toggle
This commit is contained in:
parent
b5389b2685
commit
ff379338f9
@ -17,8 +17,14 @@ export function playInstallAudio() {
|
||||
const audio = getInstallAudio();
|
||||
if (audio) {
|
||||
audio.currentTime = 0;
|
||||
audio.play();
|
||||
audio.load();
|
||||
audio.play()
|
||||
.then(() => {
|
||||
soundEnabled.set(true);
|
||||
})
|
||||
.catch(() => {
|
||||
soundEnabled.set(false);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user