AeroJack
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2011
04:09 PM
Response headers with a roVideoScreen
I have a HLS stream that I am trying to play with a roVideoScreen object. With the request for the m3u8, the server sets a cookie that it wants sent back when the individual streams are accessed. I know that the Roku does not support cookies, but if I can read the response header than I can add the correct header. But, I cannot seem to access the response headers with the VideoScreen object.
Can any point me in the right direction?
Can any point me in the right direction?
4 REPLIES 4
retrotom
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2011
06:29 PM
Re: Response headers with a roVideoScreen
Would it make more sense to just have a web page/service that returns the "session" information and then use that session identifier in subsequent requests? So could you just have a page/script like "http://www.example.com/getSessionInfo.php?contentID=blah" and have that write out the session "cookie" information in xml? And then once that XML session info is parsed, use all the values in your request for the video -- like "http://www.example.com/videoStream.php?contentID=blah&sessionID=blah".
AeroJack
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2011
11:37 AM
Re: Response headers with a roVideoScreen
Don't have control over how the server works, just trying to play the stream that comes from it.
My current thinking now is find a way to get the cookie that needs to be set from using a roURLTransfer and then passing the m3u8 playlist to a videoScreen and having it play the segments without downloading the playlist again.
My current thinking now is find a way to get the cookie that needs to be set from using a roURLTransfer and then passing the m3u8 playlist to a videoScreen and having it play the segments without downloading the playlist again.
TomCorwine
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2011
12:59 AM
Re: Response headers with a roVideoScreen
You could just do a HEAD request using roURLTransfer and grab the cookie that way. Then use roVideoScreen in the usual way, except use AddHeader() to send the cookie. Assuming, of course, the server permits HEAD requests.

RokuKevin
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2011
09:12 AM
Re: Response headers with a roVideoScreen
You can send cookies via the "Cookie" header.
Example:
Example:
cookie = "The cookie you'd like to send"
port = createObject("roMessagePort")
screen = createObject("roVideoScreen")
screen.setMessagePort(port)
screen.AddHeader("Cookie", cookie)