WebRTC or a Video Conference of Your Own

By on Jan 16, 2017 in Interesting, Intermediate, JavaScript

Firstly, let’s cover general questions concerning WebRTC. This technology allows the building of video or audio communication through the usage of web browsers. Besides, it is an open source project and currently this technology is in use among such browsers as Opera, Google Chrome, Firefox and some more. For instance, Chrome allows you the possibility to reach the webcam and microphone of a device but only for those websites having specialized a SSL certificate. In order to connect users, they need to identify each other. It can be achieved by using WebSocket technology.   How does it work? For a better understanding, let’s consider an example of a real project in web development. As a basis for the server development, we have NodeJS supplemented by the socket.io while AndularJS has become a basis for front–end development.   Chapter 1: Where can I start? The first thing you need to do during development is to check the browser’s ability to be connected to a device’s media.   setupRTC will help you check the availability of this technology support on a separate OS or browser as well as the possibility to access the media.   startCall is intended to start checking the support of this technology. After that, the initialization will be launched on the client’s side. The socket.io helps generate the ‘callRequest’ on the server.   targetId identifies which user from the database is going to get the connection request. enableSelfVideo is responsible for everything related to the broadcast. Including...