I created a live stream using the rest api and got the players for the stream but following is my player code
<div id="playerElement" style="width:100%; height:0; padding:0 0 56.25% 0"></div><script type="text/javascript">var myPlayer = WowzaPlayer.create('playerElement',{
"license":"my license key","title":"My-Test Stream","description":"MY Test player","sourceURL":"https://c8ad36-sandbox.entrypoint.cloud.wowza.com/app-c5a2/ngrp:f0aa5cf1_all/playlist.m3u8","autoPlay":false,"volume":"50","mute":false,"loop":false,"audioOnly":false,"uiShowQuickRewind":true,"uiQuickRewindSeconds":"30"}
);</script>
when i click on the player play icon it gives me error of stream unavialable check cross origin policy
what is the solution to this.
thanks
system
June 28, 2019, 4:06pm
2
You are mixing HTTP and HTTPS content which is creating a Cross Origin Resource Sharing (CORS) issue which is why you cannot play back your live streams. Your page, the player, and the URL to your stream must all use either HTTP or HTTPS.
Wowza Streaming Engine can use an SSL certificate. We provide a free StreamLock SSL certificate to our customers.
https://www.wowza.com/docs/how-to-get-ssl-certificates-from-the-streamlock-service
You can instead use your own SSL certificate if you wish. Note that once you create the JKS file you can install the certificate using the StreamLock method.
https://www.wowza.com/docs/how-to-import-an-existing-ssl-certificate-and-private-key
You can also request an SSL certificate from a certificate authority.https://www.wowza.com/docs/how-to-request-an-ssl-certificate-from-a-certificate-authority
Please also ensure that you have CORS enabled.
https://www.wowza.com/docs/how-to-enable-cross-origin-resource-sharing-cors-for-http-based-streams
I’m currently testing on localhost and using wowza cloud what is the config option for the stream to play on localhost http?
Thanks
Wowza Streaming Engine is configured to accept connections from Wowza Streaming Engine Manager on the localhost.
I’m not using streaming engine i’m using cloud