diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-01-21 10:57:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-21 10:57:49 +0100 |
commit | bef383985e7be5c8253e32758d96fa7a6e3fd257 (patch) | |
tree | 6a5f72f59d602959d0ecaf8aad3e1cee94bd7204 /platform/javascript/audio_driver_javascript.cpp | |
parent | 38a5a23a12ceaccd09b22a009dc680ec5037e367 (diff) | |
parent | 8f1669e77182af21a0c46e5314f61cc9a83beb27 (diff) |
Merge pull request #25168 from eska014/html5-autoplay
Deal with Google's HTML5 autoplay policy
Diffstat (limited to 'platform/javascript/audio_driver_javascript.cpp')
-rw-r--r-- | platform/javascript/audio_driver_javascript.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/platform/javascript/audio_driver_javascript.cpp b/platform/javascript/audio_driver_javascript.cpp index fcfc75280d..16fdc267f3 100644 --- a/platform/javascript/audio_driver_javascript.cpp +++ b/platform/javascript/audio_driver_javascript.cpp @@ -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 */ |