Package Exports
- rtcninja
- rtcninja/lib/version.browser.js
- rtcninja/lib/version.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rtcninja) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
rtcninja.js
WebRTC API wrapper to deal with different browsers.
Installation
- With npm:
$ npm install rtcninja
- With bower:
$ bower install rtcninja
Usage in Node
var rtcninja = require('rtcninja');
Browserified library
Take a browserified version of the library from the dist/
folder:
dist/rtcninja-X.Y.Z.js
: The uncompressed version.dist/rtcninja-X.Y.Z.min.js
: The compressed production-ready version.dist/rtcninja.js
: A copy of the uncompressed version.dist/rtcninja.min.js
: A copy of the compressed version.
They expose the global window.rtcninja
module.
<script src='rtcninja-X.Y.Z.js'></script>
Usage Example
// Must first call it.
rtcninja();
// Then check.
if (rtcninja.hasWebRTC()) {
// Do something.
}
else {
// Do something.
}
Debugging
The library includes the Node debug module. In order to enable debugging:
In Node set the DEBUG=rtcninja*
environment variable before running the application, or set it at the top of the script:
process.env.DEBUG = 'rtcninja*';
In the browser run rtcninja.debug.enable('rtcninja*');
and reload the page. Note that the debugging settings are stored into the browser LocalStorage. To disable it run rtcninja.debug.disable('rtcninja*');
.
Documentation
TODO
Author
Iñaki Baz Castillo.
License
ISC.