mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-07-31 12:38:58 +00:00
[emscripten] Remove support for legacy webkitGetUserMedia
This modern navigator.mediaDevices.getUserMedia has been available since Chrome 53 / Firefox 38 / Safari 11. See https://github.com/emscripten-core/emscripten/pull/27347
This commit is contained in:
@@ -333,8 +333,6 @@ static int EMSCRIPTENAUDIO_OpenDevice(_THIS, const char *devname)
|
||||
|
||||
if ((navigator.mediaDevices !== undefined) && (navigator.mediaDevices.getUserMedia !== undefined)) {
|
||||
navigator.mediaDevices.getUserMedia({ audio: true, video: false }).then(have_microphone).catch(no_microphone);
|
||||
} else if (navigator.webkitGetUserMedia !== undefined) {
|
||||
navigator.webkitGetUserMedia({ audio: true, video: false }, have_microphone, no_microphone);
|
||||
}
|
||||
}, this->spec.channels, this->spec.samples, HandleCaptureProcess, this);
|
||||
} else {
|
||||
@@ -420,8 +418,6 @@ static SDL_bool EMSCRIPTENAUDIO_Init(SDL_AudioDriverImpl *impl)
|
||||
capture_available = available && MAIN_THREAD_EM_ASM_INT({
|
||||
if ((typeof(navigator.mediaDevices) !== 'undefined') && (typeof(navigator.mediaDevices.getUserMedia) !== 'undefined')) {
|
||||
return true;
|
||||
} else if (typeof(navigator.webkitGetUserMedia) !== 'undefined') {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user