Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
synctv
Visitor

HLS via HTTPS

Hi,

In my tests it seems that HLS on HTTPS servers is not working, or I'm doing something wrong. When using roUrlTransfer, we use SetCertificatesFile() to set the cert. However, when using roVideoScreen.SetContentView(), the associative array that is passed in uses a parameter StreamUrls, which is an array of Strings. I pass the proper .m3u8 URL into there (an https://... url), however I get a -5 error:
videoScreenEvent: -5
request failed: The format is not supported or the media is corrupt.

The same code works fine if I use regular http URLs. The .m3u8 and the associated encoded segments are fine as I've tested them with the roku on a regular http server.

I'm using v2.7 build 857.

Please advise, thank you,
SyncTV
0 Kudos
2 REPLIES 2
TheEndless
Channel Surfer

Re: HLS via HTTPS

Are you using SetCertificatesFile on the roVideoScreen? If you need that for the roUrlTransfer, I'd imagine you'd need the same for the roVideoScreen. It implements the same ifHttpAgent interface, so the code should be pretty much identical.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
mike_ryan
Visitor

Re: HLS via HTTPS

Ay make sure you're setting a certificate file

We do it like so:
screen = CreateObject("roVideoScreen")
screen.SetMessagePort(port)
screen.SetContent(vid)
screen.SetCertificatesFile("pkg:/source/certs/mycert.pem")
screen.AddHeader("x-roku-reserved-dev-id","ANYTHING")

Note we're not actually using HTTPS on the stream itself we're actually using it for protecting an AES key but the code should carry over.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.