[RN] Update WebRTC polyfills

pull/3411/head
Saúl Ibarra Corretgé 7 years ago committed by Paweł Domas
parent 3ca704d81d
commit 1354731fc5
  1. 12
      react/features/base/lib-jitsi-meet/native/polyfills-webrtc.js

@ -3,14 +3,14 @@ import {
MediaStreamTrack,
RTCSessionDescription,
RTCIceCandidate,
getUserMedia
mediaDevices
} from 'react-native-webrtc';
import RTCPeerConnection from './RTCPeerConnection';
(global => {
if (typeof global.webkitMediaStream === 'undefined') {
global.webkitMediaStream = MediaStream;
if (typeof global.MediaStream === 'undefined') {
global.MediaStream = MediaStream;
}
if (typeof global.MediaStreamTrack === 'undefined') {
global.MediaStreamTrack = MediaStreamTrack;
@ -21,7 +21,7 @@ import RTCPeerConnection from './RTCPeerConnection';
if (typeof global.RTCPeerConnection === 'undefined') {
global.RTCPeerConnection = RTCPeerConnection;
}
if (typeof global.webkitRTCPeerConnection === 'undefined') {
if (typeof global.RTCPeerConnection === 'undefined') {
global.webkitRTCPeerConnection = RTCPeerConnection;
}
if (typeof global.RTCSessionDescription === 'undefined') {
@ -31,8 +31,8 @@ import RTCPeerConnection from './RTCPeerConnection';
const navigator = global.navigator;
if (navigator) {
if (typeof navigator.webkitGetUserMedia === 'undefined') {
navigator.webkitGetUserMedia = getUserMedia;
if (typeof navigator.mediaDevices === 'undefined') {
navigator.mediaDevices = mediaDevices;
}
}

Loading…
Cancel
Save