Wowza Community

WebRTC Examples Not Working - Can't Serve JSON file

I’m trying to run the WebRTC example. I have a valid cert installed on the server (works to serve rtmps), however I get this error when trying to load the publish example:

https://test.mydomain.com/webrtc-session.json 403 (Forbidden)

I don’t see any errors in the logs. The only entries I see are pertaining to the internal webserver serving the pages. I tried serving the pages from a different inhouse webserver also with a valid cert, but that seems to give the exact same error.

Running Wowza version 4.6.0

Any ideas what that might be? Thanks!

Hello,

The SDP URL on the Publish page should look like this since it runs on websockets:

wss://test.mydomain.com/webrtc-session.json

I recommend testing in Chrome or Firefox version 50.1.0.

If further assistance is needed, please open a support case here along with sending the below info:

[install-dir]/conf

[install-dir]/logs

[install-dir]/htdocs

*Browser debug log showing connection attempts. Dev Tools -> Console -> Copy and paste the contents into a text document for review.

If you are not sure how to get this information please see the following tutorial.

https://www.wowza.com/docs/how-to-create-a-compressed-zip-file-in-windows-os-x-and-linux

If files are too big for email transport (20mb), please send a link to the files.

Regards,

JasonT

Thank you Jason. So are you saying in the example publish/webrtc.js file this line:

var postURL = “https://test.mydomain.com/webrtc-session.json”;

should instead read this:

var postURL = “wss://test.mydomain.com/webrtc-session.json”;

When I make that change, I get this error:

Chrome 56.0x.

XMLHttpRequest cannot load wss://test.mydomain.com/webrtc-session.json. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.

Actually I wonder if the issue is that I am working with an older version of the examples. Can you tell me where I would find the latest versions of the WebRTC examples running under Wowza 4.6.0?

Hopefully that will solve the issue.

Thanks!

Thank you Jason! That was indeed the issue. Everything is working fine now with the updated examples.

Hello,

You are right, that appears to be the issue you are having. In the JS files it should show as:

var wsURL = “wss://test.mydomain.com/webrtc-session.json”;

You can find a link to the updated files in your WebRTC download package under, url.txt

If you are not able to track it down, please open a support case here and we can send you a link to the latest WebRTC configuration files.

Regards,

JasonT

ImAStreamer, could you please tell what exactly is your server that works to serve rtmps?

Secure RTMPS is just using RTMP with an SSL certificate, you can use any RTMP encoder. The only difference is the stream url would have rtmps in it instead of rtmp. Facebook live for example requires RTMPS streaming @Stanislav_Popadynets so this is a very common workflow at Wowza. You could get a StreamLock certificate for free through Wowza, configure it properly and be off and running with RTMPS streaming.

Wowza Streaming Engine media server supports RTMPS when using stream targets, but you need to add the value “sendSSL” as shown in the article below.

https://www.wowza.com/docs/how-to-push-streams-to-cdns-and-other-services-push-publishing#about-map-profiles

From the article:

sendSSL Set to true to enable Wowza Streaming Engine to send secure streams to the stream target destination (default is false ).

You can also create a Stream Target and add the “sendSSL” option via our REST API as shown in our documentation below.
https://www.wowza.com/docs/stream-targets-query-examples-push-publishing

1 Like