Articles in this section

Signaling server deployment and usage

Initially WebRTC technology was designed for establishing direct connections between web browsers, like it is shown onthe picture below.

The signaling server here is not a part of WebRTC engine, but it is required to initiate the connection and resolve firewall bypassing issues.

We adopted this scheme for MPlatform and MFromats SDK and created the MWebRTC object. It can act as a WebRTC streaming or receiving client. Check this article to get the idea how to use MWebRTC object: [http://docs.medialooks.com/a962d7/ How to get started with WebRTC] .

Here is how it works:

As you see you need to have a signaling server and HTML pages except of MPlatform or MFormats based application to play around with WebRTC.

We have 2 ways to deal with signaling server and test pages:

- The easy one

Go for it if you want to test the WebRTC logic and don't want to spend time for deploying signaling server and HTML pages.

Step 1: use our demo signaling server.

It is available here: https://rtc.medialooks.com:8889

It is set by default for all MPlatform and MFormats objects, so if you've just installed the SDK and using our sample applications, there is no need to do anything else.

We use [https://github.com/andyet/signalmaster Signalmaster], a Node.js-based signaling server, with some minor modifications. It helps to establish a peer connection between the MWebRTC object and the browser or another MWebRTC object.

Generate test self-signed SSL certificate (cert.pem, key.pem) to allow secure communication with your signaling server and put it in "C:\Program Files (x86)\Medialooks\MPlatform SDK\Samples WebRTC\SIGNALING SERVER\config\sslcerts" folder. Windows users can do it by using OpenSSL like described [https://msol.io/blog/tech/create-a-self-signe.../ here].

Run following in command line :

Set NODE_ENV=production

6.start the signaling server

node server.js

Once you're done with signaling server setup, don't forget to specify signaling server IP in your applications, by default after SDK installation all MWebRTC object will using https://rtc.medialooks.com:8889

In the dialog box type "TestCert" as a friendly name for the certificate and click "OK".

Now it's to create test site itself. Right click on "Sites" and choose "Add website":

In the opened window choose the name for your test site. Point to test page folder in the "Physical path" textbox ("C:\Program Files (x86)\Medialooks\MPlatform SDK\Samples WebRTC\HTML"). Select "https" in Bindings section and choose the "TestCert" in SSL certificate section

Press "OK", and now you have your own test site with an HTML page that can receive a stream from MWebRTCobject. Please note that using IIS for deploying the page isn't mandatory, you can use any engine of your choice.