This infects the global namespace with w3c object names for WebRTC objects if they do not yet exist. If Chrome or Firefox names are present, it sets those on the w3c object names.
With npm:
$ npm install webrtc-interop
or in your dependencies hash in package.json:
{
"webrtc-interop":"~0.1"
}
Require and call .infect
on it:
require('webrtc-interop').infect()
Add the browserified version to where your javascripts are stored:
$ wget -O ./path/to/javascripts/webrtc-interop.bundle.js https://raw.githubusercontent.com/davejachimiak/webrtc-interop/master/webrtc-interop.bundle.js
A production version is also available via webrtc-interop.bundle.min.js
.
Then add it to the source of a script tag in your html:
<head>
<script src="path/to/javascripts/webrtc-interop.bundle.js" type="text/javascript">
</head>
The global namespace will be infected with an object called WebRTCInterop
.
Call .infect
on it.
WebRTCInterop.infect()