BACKGROUND

DVPRemote startup using a custom URL scheme was introduced in version 2.1 of DVPRemote and significantly enhanced in version 3.0.4.  It is intended to be used by other applications (e.g. home theater controls) to exercise control  of Roku players through DVPRemote.

SUPPORTED URL SCHEMES

The following URL schemes:

  • Start DVPRemote:

        dvpremote://

  • Start DVPRemote and send specified key presses to the currently selected player:

        dvpremote://?key=Key_List

  • Start DVPRemote and select the specified channels on the currently selected player:

        dvpremote://?channel=Channel_List

  • Start DVPRemote and send specified key presses to the specified player:

        dvpremote://Player Name?key=Key_List

  • Start DVPRemote and change to the specified channesl on the specified player:

        dvpremote://Player Name?channel=Channel_List

  • Start DVPRemote and paste the text to the currently selected player from the cut/paste buffer of the iOS device:

        dvpremote://?pasteboard=Data_To_Paste_To_Player

  • Start DVPRemote, send specified remote key presses to the specified player, then exit the app by calling another URL (e.g. return to calling app):

        dvpremote://Player Name?key=Key_List&rurl=http://URL_To_Call

QUERY STRING PARAMETER PROCESSING ORDER

Regardless of the order that parameters appear in the query string (e.g. after the “?” in the URL), the actions resulting from them will be processed in the following order:

  1. Channel_List
  2. Key_List
  3. Data_To_Paste_To_Player
  4. URL_To_Call

LISTS AND SLEEP INTERVALS

Lists can be passed to the channel and key parameters.  Lists allow multiple items to be specified.  Items in a list are separated by commas.  If an integer is included in the list, a sleep of the specified integer number of seconds is invoked.  The list is processed sequentially from left to right.  For example, “channel=Netflix,5,Pandora” will result in changing to the Netflix channel, then waiting for 5 seconds before changing to the Pandora channel.

“KEY” PARAMETER

In the URL schemes, the following values can be inserted in the “Key_List”:

  • Home – sending this value for “Key to Press” presses the “Home” button in DVPRemote.
  • Rev – sending this value for “Key to Press” presses the “Rewind” button in DVPRemote.
  • Fwd – sending this value for “Key to Press” presses the “Fast Forward” button in DVPRemote.
  • Play – sending this value for “Key to Press” presses the “Play/Pause” button in DVPRemote.
  • Select – sending this value for “Key to Press” presses the “Select” button in DVPRemote.
  • Left – sending this value for “Key to Press” presses the “Left” button in DVPRemote.
  • Right – sending this value for “Key to Press” presses the “Right” button in DVPRemote.
  • Down – sending this value for “Key to Press” presses the “Down” button in DVPRemote.
  • Up – sending this value for “Key to Press” presses the “Up” button in DVPRemote.
  • Back – sending this value for “Key to Press” presses the “Back” button in DVPRemote.
  • InstantReplay – sending this value for “Key to Press” presses the “instant replay” button in DVPRemote.  This is equivalent to a 30 second rewind with no buffering.
  • Info – sending this value for “Key to Press” presses the “Info” button in DVPRemote.  (The button with the “*” used to re-arrange channels.)
  • Backspace – sending this value for “Key to Press” sends a “backspace” in text entry screens.
  • Enter – sending this value for “Key to Press” an “enter” in text entry screens.
  • Lit_ – sending this value for “Key to Press” sends the character after the “_”.  For example, “Lit_r” sends the character “r”.

“CHANNEL” PARAMETER

In URL schemes, the “channel” parameter should be set to the name of the channel or list of channels to switch to.  The channel name is the one found underneath the Icon on the Roku or in the Channel List presented by DVPRemote.  Special characters in the channel name should be URL encoded (e.g. use %20 instead of space).

The “Channels to Select” parameter also allows multiple channels to be selected.  This is important because the Roku does nothing if a command to select a channel that is already selected on the Roku is executed.  The problem with this is that the Roku will not change to the starting position of a channel if that channel is currently selected.  For example, if you have navigated several layers down hierarchy of a channel, the Roku will stay in that position after executing a change to that channel via a URL.  See “Tune In Radio Use Case” below.

“PLAYER NAME” PARAMETER

In the URL schemes, the “Player Name” parameter should be set to the name of the player which is to be controlled.  Special characters in the player name should be URL encoded (e.g. use %20 instead of space).

TUNE IN RADIO USE CASE

A DVPRemote User requested the capability to be able to change to the first “Favorite” in the Tune In Radio channel by doing a scheduled launch from the iOS app called Launch Center Pro.  To support this use case, lists needed to be added to the channel and key parameters.  The following URL is entered in Launch Center Pro for this use case:

dvpremote://?channel=Pandora,5,TuneIn%20Radio&key=10,Down,1,Select,1,Select

In the channel parameter, the Pandora channel is initially selected to ensure that the Roku is not on the the Tune In Radio channel.  A sleep of 5 seconds is invoked to allow the change to the Pandora channel to start following by a change to the Tune In Radio command.  The %20 in the Tune In Radio is the URL encoding for a space.  Special characters like a space must be URL encoded in the channel name (or a player name).

In the key parameter, the 10 initiates a sleep for 10 seconds to give the Tune In Radio Channel sufficient time to launch.  Since the Tune In Radio initially starts with “My Favorites” selected, the Down command moves the selection cursor to the first favorite.  A sleep of 1 second is invoked to let this command complete.  Next, the Select selects the channel resulting in the selection cursor on the “Play” button.  A sleep of 1 second is invoked to let this command complete.  Finally, the last Select starts the first favorite playing.

Thanks for Anastasia for providing this use case.