Initial
This commit is contained in:
15
resources/app/node_modules/get-browser-rtc/index.js
generated
vendored
Normal file
15
resources/app/node_modules/get-browser-rtc/index.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
// originally pulled out of simple-peer
|
||||
|
||||
module.exports = function getBrowserRTC () {
|
||||
if (typeof globalThis === 'undefined') return null
|
||||
var wrtc = {
|
||||
RTCPeerConnection: globalThis.RTCPeerConnection || globalThis.mozRTCPeerConnection ||
|
||||
globalThis.webkitRTCPeerConnection,
|
||||
RTCSessionDescription: globalThis.RTCSessionDescription ||
|
||||
globalThis.mozRTCSessionDescription || globalThis.webkitRTCSessionDescription,
|
||||
RTCIceCandidate: globalThis.RTCIceCandidate || globalThis.mozRTCIceCandidate ||
|
||||
globalThis.webkitRTCIceCandidate
|
||||
}
|
||||
if (!wrtc.RTCPeerConnection) return null
|
||||
return wrtc
|
||||
}
|
||||
Reference in New Issue
Block a user