Files
webrtc/test-wasm/node_shim.js
Sean DuBois ce533d527f Add StandardJS workflow
Been running these locally only.
2022-02-05 22:20:52 -05:00

11 lines
270 B
JavaScript

// This file adds RTCPeerConnection to the global context, making Node.js more
// closely match the browser API for WebRTC.
const wrtc = require('wrtc')
global.window = {
RTCPeerConnection: wrtc.RTCPeerConnection
}
global.RTCPeerConnection = wrtc.RTCPeerConnection