Skip to content

WebRTC library to make media management easier across different browsers

License

Notifications You must be signed in to change notification settings

nicketson/rtcninja.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Documentation

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

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

Author

Iñaki Baz Castillo at eFace2Face.

License

ISC.

About

WebRTC library to make media management easier across different browsers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%