Search code examples
restroku

Roku: Launching a Premium Application Directly into a Specific Video


The Roku media player provides a RESTful API with the following commands:

  • query/apps This ‘query/apps’ returns a map of all the channels installed on the Roku box paired with their app id. This command is accessed via an http GET.
  • keydown takes an argument describing the key pressed. Keydown is equivalent to pressing down the remote key whose value is the argument passed. This command is sent via a POST with no body.
  • keyup takes an argument describing the key to release. Keyup is equivalent to releasing the remote key whose value is the argument passed. This command is sent via a POST with no body.
  • keypress takes an argument describing the key that is pressed. Keyup is equivalent to pressing down and releasing the remote key whose value is the argument passed. This command is sent via a POST with no body.
  • launch takes an app id as an argument and a list of url parameters that are sent to the app id as an roAssociativeArray passed the the RunUserInterface() or Main() entry point. This command is sent via a POST with no body.

After I get a query a list of applications like so:

<apps>
<app id="5127" version="1.0.28">Roku Spotlight</app>
<app id="11" version="2.2.2002">Roku Channel Store</app>
<app id="28" version="2.0.20">Pandora</app>
<app id="12" version="2.4.6">Netflix</app>
<app id="13" version="3.2.7">Amazon Instant Video</app>
<app id="2285" version="2.1.1">Hulu Plus</app>
</apps>

I want to launch the Netflix (ID 12) application into a specific TV program or Movie:

POST /launch/12?foo=bar&someVar=someValue HTTP/1.1

Where foo and someVar are variables that I would send to Netflix that would correspond to that particular piece of content. However, I don't know which variables nor which values I need to send to the premium applications.

Is there any list of params that are accepted by Netflix/Amazon/Hulu/etc?


Solution

  • Currently these content providers do not provide an interface for launching content externally. The best you can do is use for example, the Netflix API to add content to the user's Queue. There are several 3rd party Roku channels that do this already, specifically Instant Watch Browser and MultiQ's, both are in the Roku Channel Store.