From 1354731fc56380e11c8e12dcc9874d4ffb479b58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 16 Aug 2018 14:27:31 +0200 Subject: [PATCH] [RN] Update WebRTC polyfills --- .../base/lib-jitsi-meet/native/polyfills-webrtc.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/react/features/base/lib-jitsi-meet/native/polyfills-webrtc.js b/react/features/base/lib-jitsi-meet/native/polyfills-webrtc.js index 67bd03517..a990f8b77 100644 --- a/react/features/base/lib-jitsi-meet/native/polyfills-webrtc.js +++ b/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; } }