Unregister audio initialization event listeners first

This commit is contained in:
the-djmaze 2022-07-19 11:50:57 +02:00
parent 58bcbc3aad
commit d73a179f59

View file

@ -46,11 +46,11 @@ let notificator = null,
'keydown','keyup'
],
unlock = () => {
unlockEvents.forEach(type => doc.removeEventListener(type, unlock, true));
if (audioCtx) {
console.log('AudioContext ' + audioCtx.state);
audioCtx.resume();
}
unlockEvents.forEach(type => doc.removeEventListener(type, unlock, true));
// setTimeout(()=>SMAudio.playNotification(0,1),1);
};