Use AppRTC with a custom server

You can achieve webrtc with your own server.

Several steps to follow:

1.Build your own HTTP server to provide the html service(i.e. the main page of your webRTC project instead of apprtc main page). In this step I use node.js and node-static(https://github.com/cloudhead/node-static).

2.Build your own signalling server. PeerJS is a good choice. Read the doc files. Also, code you HTML file to support peerjs.

Here is an example of peerjs implementation. It helped me a lot

https://developer.mozilla.org/en-US/demos/detail/peerjs

Goodluck!


Actually you can deploy web version of https://apprtc.appspot.com/ to your own server.

It's written on GAE (Google App Engine) - http://webrtc.googlecode.com/svn/trunk/samples/js/apprtc/ This has been moved to branches folder http://webrtc.googlecode.com/svn/branches/3.53/samples/js/apprtc/

Just register GAE account https://appengine.google.com/ and deploy this web app to it.

Next - you can connect WebRTC Android sample to you own GAE server - https://code.google.com/p/webrtc/source/browse/trunk/talk/examples/android/src/org/appspot/apprtc/AppRTCDemoActivity.java

Find line

roomInput.setText("https://apprtc.appspot.com/?r="); 

and replace apprtc server name

Tags:

Android

Webrtc