Code Monkey home page Code Monkey logo

cordova-webrtc-janus-gateway's Introduction

This is an example of how to use PhoneRTC with janus-gateway.

This example reproduces the janus-gateway echotest demo therefore it successfully sends audio and video to the webrtc janus-gateway server and receives them back, it uses a turn server (even if it's not needed, just to show it works).

I tested it on wifi and 3g using an iphone 5, see screenshot (small one is the local view, big one is the remote one).

You need to roll your own janus-gateway + turn server if you want to use this.

The webapp code is a modification of the PhoneRTC example which uses AngularJS. The interesting part was to re-use janus.js and its signalling mechanism and adapt it to work with PhoneRTC interface. Most of what i have done sits in TestCtrl.js and Angular-JS stuff can be stripped away easily if you are not familiar with it.

Build and run

The first steps to make PhoneRTC work are described here

Basically

npm install -g cordova ios-deploy
cordova platform add ios
cordova plugin add https://github.com/alongubkin/phonertc.git
[manually modify ios project settings as describeed in PhoneRTC Wiki]

Then you can build the web-app (app/ directory) to www/ like this

npm install .
./node_modules/.bin/bower install
./node_modules/.bin/grunt build --force
cordova prepare ios # propagates changes to www/ to the platforms

After this you can re-open the ios project, buld and run (on device).

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.