Sfoglia il codice sorgente

fix(setAudioOutputDeviceId): check if supported

master
Pawel Domas 4 anni fa
parent
commit
97dc07810c
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 6
    0
      react/features/base/devices/functions.js

+ 6
- 0
react/features/base/devices/functions.js Vedi File

@@ -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 = {

Loading…
Annulla
Salva