mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-07 07:00:48 +00:00
emscriptenaudio: Removed comment about Firefox not supporting userActivation.
It does now, and has since Firefox 120 (around November 2023).
(cherry picked from commit e0cee83a3a)
This commit is contained in:
parent
bc88a43d97
commit
ad93f50ee6
1 changed files with 2 additions and 2 deletions
|
|
@ -229,7 +229,7 @@ static int EMSCRIPTENAUDIO_OpenDevice(_THIS, const char *devname)
|
|||
SDL2.audioContext = new webkitAudioContext();
|
||||
}
|
||||
if (SDL2.audioContext) {
|
||||
if ((typeof navigator.userActivation) === 'undefined') { // Firefox doesn't have this (as of August 2023), use autoResumeAudioContext instead.
|
||||
if ((typeof navigator.userActivation) === 'undefined') {
|
||||
autoResumeAudioContext(SDL2.audioContext);
|
||||
}
|
||||
}
|
||||
|
|
@ -360,7 +360,7 @@ static int EMSCRIPTENAUDIO_OpenDevice(_THIS, const char *devname)
|
|||
SDL2.audio.silenceBuffer = SDL2.audioContext.createBuffer($0, $1, SDL2.audioContext.sampleRate);
|
||||
SDL2.audio.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) {
|
||||
SDL2.audioContext.resume();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue