fix sound not playing in Safari

Safari requires context.resume() to start playing sound
This commit is contained in:
Peter Salomonsen
2022-05-17 19:04:25 +02:00
committed by Anders Jenbo
parent a99b216614
commit c61ef19c54

View File

@@ -25,6 +25,7 @@ export default function init_sound() {
let context = null; let context = null;
try { try {
context = new AudioContext(); context = new AudioContext();
context.resume();
} catch (e) { } catch (e) {
} }
const sounds = new Map(); const sounds = new Map();