From e0cee83a3aaf6010f733cfa1c239d01f88676f22 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 12 Dec 2024 10:46:40 -0500 Subject: [PATCH] emscriptenaudio: Removed comment about Firefox not supporting userActivation. It does now, and has since Firefox 120 (around November 2023). --- src/audio/emscripten/SDL_emscriptenaudio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/audio/emscripten/SDL_emscriptenaudio.c b/src/audio/emscripten/SDL_emscriptenaudio.c index 6827287547..e25083d197 100644 --- a/src/audio/emscripten/SDL_emscriptenaudio.c +++ b/src/audio/emscripten/SDL_emscriptenaudio.c @@ -168,7 +168,7 @@ static bool EMSCRIPTENAUDIO_OpenDevice(SDL_AudioDevice *device) SDL3.audioContext = new webkitAudioContext(); } if (SDL3.audioContext) { - if ((typeof navigator.userActivation) === 'undefined') { // Firefox doesn't have this (as of August 2023), use autoResumeAudioContext instead. + if ((typeof navigator.userActivation) === 'undefined') { autoResumeAudioContext(SDL3.audioContext); } } @@ -284,7 +284,7 @@ static bool EMSCRIPTENAUDIO_OpenDevice(SDL_AudioDevice *device) SDL3.audio_playback.silenceBuffer = SDL3.audioContext.createBuffer($0, $1, SDL3.audioContext.sampleRate); SDL3.audio_playback.silenceBuffer.getChannelData(0).fill(0.0); var silence_callback = function() { - if ((typeof navigator.userActivation) !== 'undefined') { // Almost everything modern except Firefox (as of August 2023) + if ((typeof navigator.userActivation) !== 'undefined') { if (navigator.userActivation.hasBeenActive) { SDL3.audioContext.resume(); }