|
|
@@ -3,14 +3,14 @@ import {
|
|
3
|
3
|
MediaStreamTrack,
|
|
4
|
4
|
RTCSessionDescription,
|
|
5
|
5
|
RTCIceCandidate,
|
|
6
|
|
- getUserMedia
|
|
|
6
|
+ mediaDevices
|
|
7
|
7
|
} from 'react-native-webrtc';
|
|
8
|
8
|
|
|
9
|
9
|
import RTCPeerConnection from './RTCPeerConnection';
|
|
10
|
10
|
|
|
11
|
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
|
15
|
if (typeof global.MediaStreamTrack === 'undefined') {
|
|
16
|
16
|
global.MediaStreamTrack = MediaStreamTrack;
|
|
|
@@ -21,7 +21,7 @@ import RTCPeerConnection from './RTCPeerConnection';
|
|
21
|
21
|
if (typeof global.RTCPeerConnection === 'undefined') {
|
|
22
|
22
|
global.RTCPeerConnection = RTCPeerConnection;
|
|
23
|
23
|
}
|
|
24
|
|
- if (typeof global.webkitRTCPeerConnection === 'undefined') {
|
|
|
24
|
+ if (typeof global.RTCPeerConnection === 'undefined') {
|
|
25
|
25
|
global.webkitRTCPeerConnection = RTCPeerConnection;
|
|
26
|
26
|
}
|
|
27
|
27
|
if (typeof global.RTCSessionDescription === 'undefined') {
|
|
|
@@ -31,8 +31,8 @@ import RTCPeerConnection from './RTCPeerConnection';
|
|
31
|
31
|
const navigator = global.navigator;
|
|
32
|
32
|
|
|
33
|
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
|
|