Home

Awesome

rtcninja.js <img src="http://www.pubnub.com/blog/wp-content/uploads/2014/01/google-webrtc-logo.png" height="30" width="30">

WebRTC API wrapper to deal with different browsers transparently, eventually this library shouldn't be needed. We only have to wait until W3C group in charge finishes the specification and the different browsers implement it correctly :sweat_smile:.

<img src="http://images4.fanpop.com/image/photos/21800000/browser-fight-google-chrome-21865454-600-531.jpg" height="250" width="250">

Supported environments:

Installation

npm:

$ npm install rtcninja

and then:

var rtcninja = require('rtcninja');

bower:

$ bower install rtcninja

Browserified library

Take a browserified version of the library from the dist/ folder:

They expose the global window.rtcninja module.

Usage

In the examples folder we provide a complete one.

// Must first call it.
rtcninja();

// Then check.
if (rtcninja.hasWebRTC()) {
    // Do something.
}
else {
    // Do something.
}

Documentation

You can read the full API documentation in the docs folder.

Issues

https://github.com/eface2face/rtcninja.js/issues

Developer guide

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*');.

Copyright & License