瀏覽代碼

fix VADAudioAnalyser: catch error

On Firefox it throws:
DOMException: AudioContext.createMediaStreamSource: Connecting AudioNodes from AudioContexts with different sample-rate is currently not supported.
dev1
Pawel Domas 4 年之前
父節點
當前提交
6df3edc085
共有 1 個檔案被更改,包括 3 行新增0 行删除
  1. 3
    0
      modules/detection/VADAudioAnalyser.js

+ 3
- 0
modules/detection/VADAudioAnalyser.js 查看文件

@@ -165,6 +165,9 @@ export default class VADAudioAnalyser extends EventEmitter {
165 165
                     // Iterate through the detection services and set their appropriate mute state, depending on
166 166
                     // service this will trigger a DETECTOR_STATE_CHANGE which in turn might start the _vadEmitter.
167 167
                     this._changeDetectorsMuteState(track.isMuted());
168
+                })
169
+                .catch(error => {
170
+                    logger.warn('Failed to start VADAudioAnalyser', error);
168 171
                 });
169 172
         }
170 173
     }

Loading…
取消
儲存