Code Monkey home page Code Monkey logo

rtcninja.js's Introduction

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.

rtcninja.js's People

Contributors

ibc avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.