浏览代码

[RN] Update WebRTC polyfills

master
Saúl Ibarra Corretgé 7 年前
父节点
当前提交
1354731fc5
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6
    6
      react/features/base/lib-jitsi-meet/native/polyfills-webrtc.js

+ 6
- 6
react/features/base/lib-jitsi-meet/native/polyfills-webrtc.js 查看文件

3
     MediaStreamTrack,
3
     MediaStreamTrack,
4
     RTCSessionDescription,
4
     RTCSessionDescription,
5
     RTCIceCandidate,
5
     RTCIceCandidate,
6
-    getUserMedia
6
+    mediaDevices
7
 } from 'react-native-webrtc';
7
 } from 'react-native-webrtc';
8
 
8
 
9
 import RTCPeerConnection from './RTCPeerConnection';
9
 import RTCPeerConnection from './RTCPeerConnection';
10
 
10
 
11
 (global => {
11
 (global => {
12
-    if (typeof global.webkitMediaStream === 'undefined') {
13
-        global.webkitMediaStream = MediaStream;
12
+    if (typeof global.MediaStream === 'undefined') {
13
+        global.MediaStream = MediaStream;
14
     }
14
     }
15
     if (typeof global.MediaStreamTrack === 'undefined') {
15
     if (typeof global.MediaStreamTrack === 'undefined') {
16
         global.MediaStreamTrack = MediaStreamTrack;
16
         global.MediaStreamTrack = MediaStreamTrack;
21
     if (typeof global.RTCPeerConnection === 'undefined') {
21
     if (typeof global.RTCPeerConnection === 'undefined') {
22
         global.RTCPeerConnection = RTCPeerConnection;
22
         global.RTCPeerConnection = RTCPeerConnection;
23
     }
23
     }
24
-    if (typeof global.webkitRTCPeerConnection === 'undefined') {
24
+    if (typeof global.RTCPeerConnection === 'undefined') {
25
         global.webkitRTCPeerConnection = RTCPeerConnection;
25
         global.webkitRTCPeerConnection = RTCPeerConnection;
26
     }
26
     }
27
     if (typeof global.RTCSessionDescription === 'undefined') {
27
     if (typeof global.RTCSessionDescription === 'undefined') {
31
     const navigator = global.navigator;
31
     const navigator = global.navigator;
32
 
32
 
33
     if (navigator) {
33
     if (navigator) {
34
-        if (typeof navigator.webkitGetUserMedia === 'undefined') {
35
-            navigator.webkitGetUserMedia = getUserMedia;
34
+        if (typeof navigator.mediaDevices === 'undefined') {
35
+            navigator.mediaDevices = mediaDevices;
36
         }
36
         }
37
     }
37
     }
38
 
38
 

正在加载...
取消
保存