I have one question. Recently i have get link from my streaming server to play in my website. My streaming server use http link but my website use https ssl. During i get the link to play it cannot get content from my streaming server by show the following error:
I am looking forward to hearing from all of you soon.
Thanks in advance.
Best Regards,
Chhenghong
This error happens because you cannot access HTTP resource from HTTPS page, for security consideration. It is the browser behaviour.
To fix this issue, a proxy endpoint can be made in server side, such as
/proxy/playlist.m3u8
, which accept HTTP GET request. The browser will fetch the resource fromhttps://<your-server>/proxy/playlist.m3u8
, as if it is stored in your host. As it is an HTTPS request, no error.In the server side, when
GET
request to/proxy/playlist.m3u8
is listened, the HTTP request would be proxied to your streaming server (sendGET
request to the streaming server with all headers, parameters and body). When the response from streaming server is received, the response would be returned to browser directly, with all response headers and data.As the HTTP request to streaming server happens in your server side, the restriction logic from browser does not apply any more.
For example, if the server is written in Node.js, with Express and
request
module, the proxy endpoint would look like: