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: 
ryaowe
Visitor

HLS cookie support

I've read several other threads that indicate that Roku doesn't directly support cookies. Does this mean that BrightScript doesn't have access to cookies? Or that Roku ignores Set-Cookie headers altogether? Are there any plans to add support for cookies, specifically in the context of HLS?

We're doing live streaming using HLS, and some session information is stored in a cookie that is sent to the client using a standard Set-Cookie HTTP header. In a subsequent request to reload the m3u8, the Cookie header is not present. This seems like a bug, since the HLS specification mentions cookie support, but we were wondering if there is something we need to do to enable it. (see http://tools.ietf.org/html/draft-pantos ... section-10)
0 Kudos
4 REPLIES 4
RokuChris
Roku Employee
Roku Employee

Re: HLS cookie support

One possible solution would be to manually fetch the m3u8 before you begin playback using roURLTransfer and extract the cookie from that response using GetResponseHeaders(). Once you have the cookie, you can assign its value to your roVideoScreen using the AddHeader() function.
0 Kudos
ryaowe
Visitor

Re: HLS cookie support

Thanks for the quick reply. Unfortunately, that doesn't quite work for us, as the cookie value changes with each m3u8 refresh. There are other methods we could use to work around this, but they're more difficult to scale. And Roku is currently our only target platform that doesn't seem to support cookies.
0 Kudos
dherbst
Visitor

Re: HLS cookie support

I'll second this request - our streaming provider uses a cookie based approach to creating authorization tokens for HLS which we would like to use, but it looks like it cannot be used on Roku without proper cookie support.

Please let us know if you plan on implementing this sometime soon.
0 Kudos
bosborne
Visitor

Re: HLS cookie support

I also need this.

I noticed that we can call EnableCookies on roVideoScreen now. However, even when doing so, it still doesn't seem to set the cookies that were returned from the server. Any ideas?
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.