You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Deal with Google's HTML5 autoplay policy
Resume audio context after mouse, touch or key input.
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user