浏览代码

fix(setAudioOutputDeviceId): check if supported

master
Pawel Domas 4 年前
父节点
当前提交
97dc07810c
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6
    0
      react/features/base/devices/functions.js

+ 6
- 0
react/features/base/devices/functions.js 查看文件

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

正在加载...
取消
保存