Skip to content
Augustin Roux edited this page Jul 3, 2015 · 2 revisions

R7

The R7 function sends an RPC request and associate it with a callback handling the response.

R7(method, [callback], [context])
R7(method, params, [callback], [context])

navigate

Little helper to access the navigate method.

R7.navigate(route, options, callback, context)

Equivalent to:

R7('navigate', { control: route, context: options }, callback, context)

ready / onReadyState

Execute a callback (the boot callback) when the iframe is loaded. You should always put booting process in the given callback of this function.

R7.ready(callback, [context])

grabKey

Execute an action when a key is pressed. If a key is already bound, the former action is overridden.

R7.grabKey(key, callback , [context])
  • key The name of the key as listed below. You can also pass an Object to activate the throttle: { KeyName: { after: 300, throttle: 100 } }. The callback will be fired every 100ms after 300ms if the user holds the key.
  • callback The callback function that will be executed when the key is pressed
  • context: Context of execution of the callback

The keys that can be grabbed are:

  • Up
  • Down
  • Right
  • Left
  • Enter
  • Mute
  • Zoom
  • Back
  • Exit
  • Guide
  • Menu
  • Numeric
  • Rewind
  • Play
  • Forward
  • Stop
  • Pause
  • Rec
  • TV

releaseKey

Unbind an action linked to the given key

R7.releaseKey(key)

addStreamListener

Registers the specified listener to an event. See the list of events listenable in external applications|EventsList.

R7.addStreamListener(event, callback, [context]);

exit

Works only in the iframe application, closes itself.

R7.exit();
Clone this wiki locally