PhoneRTC demo application
I am trying to run the PhoneRTC demo. https://github.com/alongubkin/phonertc/
I really have a bunch of doubts
First of all, my understanding: 1. We need a TURN server 2. We need a signaling server (demo / server in repo) 3. We need a cordova project that will use the phoneRTC project (demo / client in repo)
-
there is an AWS instance assigned with dynamic DNS. installed TURN server and started it, but now I am confused about the private ip and the public ip part mentioned in the tutorial, as my ip changes every time I restart the instance. I have one dns name (from noip) that will stick with this. So I am looking into how to set up a TURN server with this
-
I checked the source code and followed the steps npm install cordva etc,
-
For the signaling server, I went to the demo / server in the source code and tried node index.js after installing npm, but got a few errors regarding the module not found.
-
demo / client is also a nodeJS project, right? If I start it, it's a video chat, right?
source to share
Amazon provides Elastic IPs that allow you to create permanent IP addresses for your EC2 hosts.
Here are the complete commands required to run the demo from scratch:
# install global dependencies
npm install -g cordova bower grunt-cli
# clone phonertc
git clone https://github.com/alongubkin/phonertc.git
# build client
cd demo/client
npm install
bower install
cordova plugin add org.apache.cordova.device
cordova plugin add org.apache.cordova.console
cordova plugin add https://github.com/alongubkin/phonertc.git
# follow the instructions for iOS after running this command
cordova platform add ios android
# before running the next command, make sure to
# change your server details in demo/client/app/scripts/signaling.js
# and in demo/client/app/scripts/CallCtrl.js
grunt build --force
# build server
cd ../server
npm install
To start the server:
cd demo/server
node index.js
Running client on Android:
cordova run android
Launch client on iOS startup:
cordova build ios
And run the project with Xcode on a real iOS device.
source to share
I got the demo and followed these steps (Android) with ionic CLI:
# install global dependencies
npm install -g cordova bower grunt-cli
# Get a GIT clone, needed for copying files
git clone https://github.com/alongubkin/phonertc.git
# start new ionic project
ionic create phonertc-ionic
cd phonertc
# Copy files from GIT clone to your ionic project
cp -R phonertc-gitclone\demo\client\* phonertc-ionic\
# install dependencies
npm install
bower install
# install plugins
cordova plugin add org.apache.cordova.device
cordova plugin add org.apache.cordova.console
cordova plugin add https://github.com/alongubkin/phonertc.git
# add android platform
cordova platform add android
# install/running signaling server
cd phonertc-gitclone/demo/server
npm install
node index.js
# setting up turn server (not sure if needed)
# I installed it on a VirtualBox Ubuntu server, also see:
# https://github.com/alongubkin/phonertc/wiki/Installation
# Next ports should be open to your Ubuntu TURN server:
# TCP 443
# TCP 3478-3479
# TCP 32355-65535
# UDP 3478-3479
# UDP 32355-65535
sudo apt-get install rfc5766-turn-server
# Edit /etc/turnserver.conf and change:
listening-ip=<internal IP VirtualBox Ubuntu>
relay-ip=<internal IP VirtualBox Ubuntu>
external-ip=<internal IP VirtualBox Ubuntu>
min-port=32355
max-port=65535
realm=<your domain>
# Also uncomment
lt-cred-mech
fingerprint
# Edit /etc/turnuserdb.conf and at the end, add:
username:password
# Start TURN server
sudo /etc/init.d/rfc5766-turn-server start
# before running the next command, make sure to
# change your server details in demo/client/app/scripts/signaling.js
# and in demo/client/app/scripts/CallCtrl.js
cd phonertc-ionic/
grunt build --force
# Copy files from phonertc-ionic app dir to www dir
cp -R phonertc-ionic/app/* phonertc-ionic/www/
# Build and run to android
ionic run android
Note:
Complete phonertc-ionic and phonertc-gitclone with your. I can only test 2 Android devices at the moment. The sound is shit at the moment, but the video is great. Trying to build on iOS now.
source to share