Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(setAudioOutputDeviceId): check if supported

Pawel Domas97dc07810c5f
diff --git a/react/features/base/devices/functions.js b/react/features/base/devices/functions.js
index 28586e687c..2782ea0e2e 100644
--- a/react/features/base/devices/functions.js
+++ b/react/features/base/devices/functions.js
@@ -267,6 +267,12 @@ export function setAudioOutputDeviceId(
logger.debug(`setAudioOutputDevice: ${String(newLabel)}[${newId}]`);
+ if (!JitsiMeetJS.mediaDevices.isDeviceChangeAvailable('output')) {
+ logger.warn('Adjusting audio output is not supported');
+
+ return Promise.resolve();
+ }
+
return JitsiMeetJS.mediaDevices.setAudioOutputDevice(newId)
.then(() => {
const newSettings = {