emscripten-pre-js: remove autoplay workaround

It didn't work with recent emscripten versions anyway. A better fix
is coming to emscripten's SDL port.
This commit is contained in:
Sebastian Krzyszkowiak 2020-03-02 03:23:01 +01:00
parent 4fe091d93c
commit d753279764
No known key found for this signature in database
GPG key ID: E8F235CF3BDBC3FF

View file

@ -3,12 +3,3 @@ if (!Module) Module = (typeof Module !== 'undefined' ? Module : null) || {};
// Disable image and audio decoding
Module.noImageDecoding = true;
Module.noAudioDecoding = true;
// autoplay workaround
document.addEventListener("click", function() {
try {
if (!SDL2 || !SDL2.audioContext || !SDL2.audioContext.resume) return;
SDL2.audioContext.resume();
} catch (err) {}
}
);