Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 1.57 KB

README.md

File metadata and controls

45 lines (30 loc) · 1.57 KB

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