Play Video with redirect url

632 views Asked by At

In our channel we have a url to play videos that does a last check for authentication then redirects to the CDN url and that plays a video. This was all done over http in all of our test channels and works great.

The problem is when we deployed to our live website hosting the API the server is set up to redirect all requests to HTTPS. I figured out how to get HTTPS calls to work for all my api calls just fine. The last problem I am having is that the HTTPS call is made to our server then redirects to HTTP CDN server and not working every time I try. The error messages that brightscript returns aren't very helpful I jst get the generic error code 11 with message "Unspecified or invalid track path/url."

Anyone have any experience with this ? or any idea what to do? so far I have tried setting up the roVideoScreen to have all the settings to allow an HTTPS call , I think it is getting stuck when it catches a redirect to HTTP.

ex.

...
video = CreateObject("roVideoScreen")
....
video.SetContent(videoclip)
video.AddHeader("Accept", "*/*")
video.SetCertificatesFile("common:/certs/ca-bundle.crt")
video.SetCertificatesDepth(3)
video.InitClientCertificates()
video.EnableCookies()
video.show()
1

There are 1 answers

0
Pieter Siekerman On

Perhaps a solution where to do a separate roUrlTransfer with the HTTPS url first and see if you can get the HTTP url (which you are being redirected to) through the response or any of the roUrlEvent callbacks? Then pass that HTTP url to the video player?

Hard to tell though if you could catch the right information without having a sample stream to test the theory with.