JSPM

  • Created
  • Published
  • Downloads 1547
  • Score
    100M100P100Q8556F
  • License MIT

WebRTC API wrapper to deal with different browsers

Package Exports

  • rtcninja

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 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 😅.

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:

  • dist/rtcninja.js: The uncompressed version.
  • dist/rtcninja.min.js: The compressed production-ready version.

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

  • Create a branch with a name including your user and a meaningful word about the fix/feature you're going to implement, ie: "jesusprubio/fixstuff"
  • Use GitHub pull requests.
  • Conventions:
  • We use JSHint and Crockford's Styleguide.
  • Please run gulp lint to be sure your code fits with them.

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

  • eFace2Face Inc.
  • MIT