Procházet zdrojové kódy

fix(setAudioOutputDeviceId): check if supported

master
Pawel Domas před 4 roky
rodič
revize
97dc07810c
1 změnil soubory, kde provedl 6 přidání a 0 odebrání
  1. 6
    0
      react/features/base/devices/functions.js

+ 6
- 0
react/features/base/devices/functions.js Zobrazit soubor

@@ -267,6 +267,12 @@ export function setAudioOutputDeviceId(
267 267
 
268 268
     logger.debug(`setAudioOutputDevice: ${String(newLabel)}[${newId}]`);
269 269
 
270
+    if (!JitsiMeetJS.mediaDevices.isDeviceChangeAvailable('output')) {
271
+        logger.warn('Adjusting audio output is not supported');
272
+
273
+        return Promise.resolve();
274
+    }
275
+
270 276
     return JitsiMeetJS.mediaDevices.setAudioOutputDevice(newId)
271 277
         .then(() => {
272 278
             const newSettings = {

Načítá se…
Zrušit
Uložit