Class: AppMan

AppMan

Wrapper for the OIPF/HbbTV application manager.
Source:
Example

Use the application manager to make the application visible and request keys from the terminal.

var AppMan = require('hbbtv-lib/main/appman');
AppMan.show();
AppMan.addKey(AppMan.COLOR);
AppMan.addKey(AppMan.NAVIGATION);

Members

(static, constant) ALL

Key code for all buttons
Source:

(static, constant) BLUE

Key code for the blue color button
Source:

(static, constant) COLOR

Key code for all color buttons
Source:

(static, constant) GREEN

Key code for the green color button
Source:

(static, constant) NAVIGATION

Key code for the navigation key set (arrow keys and OK button)
Source:

(static, constant) NONE

Key code for no button
Source:

(static, constant) NUMERIC

Key code the numeric buttons (0, 1, 2, ... 9)
Source:

(static, constant) RED

Key code for the red color button
Source:

(static, constant) VCR

Key code for the play/pause, play, pause and stop buttons
Source:

(static, constant) YELLOW

Key code for the yellow color button
Source:

Methods

(static) addActivationListener(callback)

An autostart broadcast related application is not activated by default (since 2.0). It does not receive Numeric and VCR events if it is not activated. It gets activated when it receives a colour or navigation key.
Parameters:
Name Type Description
callback function Callback function that is notfied after the activation listener has been called
Source:

(static) addKey(keyCode)

Add a keyset constant(s) to the requested set of remote control (RC) keys.

RC keys in HbbTV 2 are split into a set that is available all time and a set that is available only after activation of the app. The app is activated when the user presses a key from the first set assuming the application had requested it.

Keys available all time: NAVIGATION, COLOUR.

Keys available after activation: NUMERICAL, VCR.

The keyset always shows which keys are available to the application, i.e. if the requested keyset is larger than the keys that are available, the resulting keyset contains only a subset of the requested one.

You can use the appman to add all required keys by your application before activation, however you have to use applyKeyset after your application got activated.

On terminals running HbbTV 1.x RC keys are always available to applications.

Note: Use this function carefully, request only keys you need and release keys with remKey when you don't need a key any longer.

Parameters:
Name Type Description
keyCode number
Source:
To Do:
  • success/error feedback for user

(static) applyKeyset()

Re-applies a released keyset.
Source:
See:
To Do:
  • success/error feedback for user

(static) createApp(url)

Creates a new HbbTV application.

Use dvb: URLs to launch another broadcast-related application

Use https: URLs to launch a broadcast independent application

Parameters:
Name Type Description
url * URL of application to run,
Source:
To Do:
  • success/error feedback for user

(static) getCurrentChannel() → {number}

For broadcast related applications returns the channel that carries the AIT that currently controls this application or null.
Source:
To Do:
  • success/error feedback for user
Returns:
Current channel
Type
number

(static) hide()

Hide the browser window.
Source:
To Do:
  • success/error feedback for user

(static) killme()

Calls destroyApplication.
Source:
To Do:
  • success/error feedback for user

(static) remKey(keyCode)

Removes the value from the requested keyset, i.e. releases RC keys.
Parameters:
Name Type Description
keyCode number keys to release, return to control of terminal
Source:

(static) show()

Show the browser window.
Source:
To Do:
  • success/error feedback for user