浏览代码

[RN] Fix error on undefined variable

adapter.screenshare.js uses the variable requestUserMedia without
defining it. And that's a problem because it's packed in strict mode so
it will cause an error to be thrown at runtime which will fail
lib-jitsi-meet and, consequently, the whole app. As the variable
requestUserMedia appears to be global in certain browser, prevent the
use of the undefined variable without really changing the outcome of its
use.
dev1
Lyubo Marinov 8 年前
父节点
当前提交
a6005b7bba
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      modules/RTC/adapter.screenshare.js

+ 1
- 1
modules/RTC/adapter.screenshare.js 查看文件

4255
        window.getUserMedia = navigator.getUserMedia;
4255
        window.getUserMedia = navigator.getUserMedia;
4256
     if ( navigator.mediaDevices &&
4256
     if ( navigator.mediaDevices &&
4257
       typeof Promise !== 'undefined') {
4257
       typeof Promise !== 'undefined') {
4258
-      navigator.mediaDevices.getUserMedia = requestUserMedia;
4258
+      navigator.mediaDevices.getUserMedia = typeof requestUserMedia === 'undefined' ? undefined : requestUserMedia;
4259
     }
4259
     }
4260
   }
4260
   }
4261
 
4261
 

正在加载...
取消
保存