Pushing a HTTP Stream To Roku

18 Sep 2016 23:11

After a bit of traffic capturing, I managed to find out how to make Roku play an HTTP stream by URL.

It seems a Roku device (Roku TV in my case) hosts an HTTP server which is exposed on port 8060.

There's a series of MDNS requests to determine the available player in the network, but we can skip that since I assume you know the IP address of your Roku. After the device (a phone in my case) identified the target player, it sends an HTTP request:

GET http://your-roku-address:8060/query/device-info

You get a nice XML document in return that lists some properties like this:

   <model-name>Hisense 40H4</model-name>

You can see for example my device is Hisense 40H4 and it's a secure device.

This is interesting, but this doesn't cause anything to play.

Here's the part that gets Roku to play something:

POST http://your-roku-address:8060/input/15985?t=v&u=http%3A%2F%2F192.168.1.108%3A8000%2Fstream.m3u8&k=(null)&videoName=

That's it, you pass the m3u8 URI as u param (need to URL encode it first) and Roku starts playing it. Note the HTTP method used in POST, but the payload is empty.

I'm not sure what's the meaning of 15985 in the URL, maybe it's the ID of the PlayOnRoku video source.

More posts on this topic


Add a New Comment
or Sign in as Wikidot user
(will not be published)
- +
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License