First Step In WebRTC

.

Introduction

Here i will show you how to execute very simple WebRTC demo served by Apache web server . The example is how to get the media stream of the local device. I will take as an example the WebRTC “getUserMedia” example from the book “Real-Time Communication with WebRTC by Salvatore Loreto and Simon Pietro(O’Reilly)”. You can find the source code on the book’s GitHub page. Follow these steps:

  • Create a folder for your WebRTC project: # mkdir /var/www/html/webrtc
  • Create subdirector for Javascript files: # mkdir /var/www/html/webrtc/js
  • Open Apache configuration file “/etc/httpd/conf/httpd.conf” and add this line:

Alias  /webc  /var/www/html/webrtc

    Restart Apache: # systemctl restart httpd.service

Screenshot from 2015-03-08 20:20:28To debug your project, open the browser console (e.g. Chrome: More tools –> Javascript Console).

JSFIDDLE Framework

You can use jsfiddle framework to write, save, validate, and run your application online.

Notes

  • Update your browser (bug fixes). Using the developer edition is a good choice (e.g. Firefox Developer Edition).
  • Test your application on different browsers

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s