Getting started with WebRTC – Building

 

If you have not heard about WebRTC its a good time to learn. Its one of the technologies thats finally getting lot of attention.

Why should I care ?

For starters, with WebRTC you can easily integrate chat, video/audio calling and file transfer into your application. The coolest thing is that if you are building a web app, no one needs to download and install plugins for video calling. Performance wise its quite neat. I read that WebRTC frame rate is around 30fps where as other solutions are around 16fps. Skype recently announced that they will look in to integration of WebRTC on its platform.

Getting started – Android

  • Compile WebRTC

This stands to be one of the paint points when developing WebRTC applications. Luckily good people at pristine.io has come up with a guide and build scripts to make this process quite straightforward. I would suggest the following steps to get WebRTC library compiled using pristine.io build scripts.

  • Setup a virtual box with a guest ubuntu installation
    • I used ubuntu-14.04.1 with virtual box
  • Install git on the guest machine

sudo apt-get install git

  • Clone prestine IO’s build scripts

git clone https://github.com/pristineio/webrtc-build-scripts.git

# Source all the routines
source android/build.sh

# Install any dependencies needed
install_dependencies

# Pull WebRTC
get_webrtc

  • Run the following commands as mentioned on the README

export WEBRTC_ARCH=armv7 #or armv8, x86, or x86_64
prepare_gyp_defines &&
execute_build

If everything works out smoothly you should be able to find the compiled native library on the directory libjingle_peerconnection_builds

Getting started with WebRTC – Building

Leave a comment