# WebRTC Examples Not Working - Can't Serve JSON file

**URL:** <https://community.wowza.com/t/webrtc-examples-not-working-cant-serve-json-file/47922>\
**Category:** Wowza Streaming Engine\
**Created:** [February 15, 2017, 1:29pm UTC](https://community.wowza.com/t/webrtc-examples-not-working-cant-serve-json-file/47922 "2017-02-15T13:29:33Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ImAStreamer](https://avatars.discourse-cdn.com/v4/letter/i/9de053/32.png) [@ImAStreamer](https://community.wowza.com/u/ImAStreamer)\
**Post date:** [February 15, 2017, 1:29pm UTC](https://community.wowza.com/t/webrtc-examples-not-working-cant-serve-json-file/47922/1 "2017-02-15T13:29:33Z")

</div>

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](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!

---

<div class="post-metadata">

**Author:** ![Jason\_Tuchler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/jason_tuchler/32/462_2.png) [@Jason\_Tuchler](https://community.wowza.com/u/Jason_Tuchler)\
**Post date:** [February 15, 2017, 10:37am UTC](https://community.wowza.com/t/webrtc-examples-not-working-cant-serve-json-file/47922/2 "2017-02-15T10:37:17Z")

</div>

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](https://www.wowza.com/support/open-ticket) 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](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

---

<div class="post-metadata">

**Author:** ![ImAStreamer](https://avatars.discourse-cdn.com/v4/letter/i/9de053/32.png) [@ImAStreamer](https://community.wowza.com/u/ImAStreamer)\
**Post date:** [February 15, 2017, 2:35pm UTC](https://community.wowza.com/t/webrtc-examples-not-working-cant-serve-json-file/47922/3 "2017-02-15T14:35:22Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![ImAStreamer](https://avatars.discourse-cdn.com/v4/letter/i/9de053/32.png) [@ImAStreamer](https://community.wowza.com/u/ImAStreamer)\
**Post date:** [February 15, 2017, 2:50pm UTC](https://community.wowza.com/t/webrtc-examples-not-working-cant-serve-json-file/47922/4 "2017-02-15T14:50:34Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![ImAStreamer](https://avatars.discourse-cdn.com/v4/letter/i/9de053/32.png) [@ImAStreamer](https://community.wowza.com/u/ImAStreamer)\
**Post date:** [February 17, 2017, 2:50pm UTC](https://community.wowza.com/t/webrtc-examples-not-working-cant-serve-json-file/47922/5 "2017-02-17T14:50:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jason\_Tuchler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/jason_tuchler/32/462_2.png) [@Jason\_Tuchler](https://community.wowza.com/u/Jason_Tuchler)\
**Post date:** [February 16, 2017, 11:08am UTC](https://community.wowza.com/t/webrtc-examples-not-working-cant-serve-json-file/47922/6 "2017-02-16T11:08:39Z")

</div>

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](https://www.wowza.com/support/open-ticket) and we can send you a link to the latest WebRTC configuration files.

Regards,

JasonT

---

<div class="post-metadata">

**Author:** ![Stanislav\_Popadynets](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@Stanislav\_Popadynets](https://community.wowza.com/u/Stanislav_Popadynets)\
**Post date:** [October 8, 2020, 3:18pm UTC](https://community.wowza.com/t/webrtc-examples-not-working-cant-serve-json-file/47922/7 "2020-10-08T15:18:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![video\_streaming](https://avatars.discourse-cdn.com/v4/letter/v/22d042/32.png) [@video\_streaming](https://community.wowza.com/u/video_streaming)\
**Post date:** [October 8, 2020, 8:18pm UTC](https://community.wowza.com/t/webrtc-examples-not-working-cant-serve-json-file/47922/8 "2020-10-08T20:18:10Z")

</div>

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](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.

> **[Manage stream targets with the REST API](https://www.wowza.com/docs/stream-targets-query-examples-push-publishing)**
>
> Use the push publishing map file to manage stream targets with these Wowza Streaming Engine REST API query examples.
