Deal with Google's HTML5 autoplay policy

Resume audio context after mouse, touch or key input.
This commit is contained in:
Leon Krause committed 2019-01-20 14:25:15 +01:00
1 parent 09e4d7e9eb
commit 8f1669e771
3 files changed
+16

No files matched your search

@@ -146,6 +146,15 @@ void AudioDriverJavaScript::start() {
/* clang-format on */
}
void AudioDriverJavaScript::resume() {
/* clang-format off */
EM_ASM({
if (_audioDriver_audioContext.resume)
_audioDriver_audioContext.resume();
});
/* clang-format on */
}
int AudioDriverJavaScript::get_mix_rate() const {
/* clang-format off */