Playing Videos Using webRTC

  1. To play streams from EMS using webRTC, the following command needs to be executed first on EMS:

     startwebrtc ersip= ersport=3535 roomid=MyRoom


    The room name should be unique as much as possible, especially when using the public ERS to prevent room name conflicts. If the room name is already taken, EMS would return an error on the console logs to indicate such scenario.

  2. Access the test page demo/evowrtcclient.html and use the matching room ID and existing stream name on EMS as parameter to the request:


    The video will play automatically once it has successfully connected with EMS.

Debugging WebRTC

Issue: EMS is not running webrtc, or EMS is not connected to the “room” being joined.

Check: Normally, when a browser was able to establish connection with EMS, the EMS logo would appear on the HTML5 player:


If no logo appeared, then that means it wasn’t able to connect with EMS because of the reasons stated on this item. For this scenario, check that EMS has started webRTC and that you are using the correct room.

Issue: EMS was not able to successfully establish a data channel.

Check: This will again result with a “no logo” scenario. Only, this will mean a further investigation as to why this actually happened. If you are sure that item #1 is not the issue, then EMS logs should be sent out to EvoStream support.

Issue: Stream is not available.

Check: In this case, the logo of EvoStream would appear and would just be stuck there. If you ticked on the “Show debug messages” IMMEDIATELY RIGHT AFTER loading the webRTC page, a couple of logs such as these can be seen:

1453259850224: Media source is now ready.
1453259850224: Command: {"payload":{"description":"Requested stream could not be sent!","name":"test2","status":"FAIL"},"type":"fmp4Response"}
1453259850222: channelOpen emsStreamChannel
1453259850221: Sending request for fmp4...
1453259850221: channelOpen emsCommandChannel
1453259850219: Connection established with qKbPr2FJHicfvNx6xRP0

The log means, although connection was indeed established, the stream that is being requested is not available.