1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 17:59:55 +02:00
Oinktube/node_modules/get-browser-rtc/index.js
2023-02-17 15:04:26 -03:00

15 lines
620 B
JavaScript

// 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
}