1.0.1 ENABLE.cec

Namespace: cec

Functions for get/set HDMI CEC settings.

Namespaces

event
mode

Methods

static ENABLE.cec.getCecSettings () {Object}

Get HDMI CEC settings.

Since:
  • 1.0.0
Returns:
Name Type Description
object Object
Name Type Description
status_code String ENABLE.status.SUCCESS or
ENABLE.status.NOT_READY
cec_one_touch_play Boolean HDMI CEC one touch play mode
cec_osd_name String HDMI CEC osd name
cec_remote_control Boolean HDMI CEC remote control mode (only tv2stb is supported in Android)
cec_standby String HDMI CEC standby control mode (off, stb2tv, tv2stb, both)
cec_enable Boolean HDMI CEC status, true if enable

static ENABLE.cec.oneTouchPlay () {Object}

HDMI-CEC one touch play which set the STB as current active source
Notice that this function requires getCecSettings().cec_one_touch_play == true in order to take effect.

Since:
  • 1.0.0
Returns:
Name Type Description
object Object
Name Type Description
status_code String ENABLE.status.SUCCESS or
ENABLE.status.NOT_READY

static ENABLE.cec.setCecSettings (settings) {Object}

Set HDMI CEC settings

Name Type Description
settings Object
Name Type Description
cec_one_touch_play Boolean

HDMI CEC one touch play mode

cec_remote_control Boolean

HDMI CEC remote control mode (only tv2stb is supported in Android)

cec_standby String

HDMI CEC standby control mode (off, stb2tv, tv2stb, both)

cec_enable Boolean

HDMI CEC status, true if enable

Since:
  • 1.0.0
Returns:
Name Type Description
object Object
Name Type Description
status_code String ENABLE.status.SUCCESS or
ENABLE.status.NOT_READY or
ENABLE.status.INVALID_ARGUMENT

static ENABLE.cec.setEventCallback (callback) {Object}

Register HDMI CEC event callback function.
Only one callback function can be registered. Pass null as callback to unregister.
Example:

var callback = function(obj) {
    if (obj.event === ENABLE.cec.event.HDMI_CEC_STB_SELECTED){
        console.log("STB is now active source!");
    }
};
ENABLE.cec.setEventCallback(callback);
Name Type Description
callback ENABLE.cec~Callback

Callback function.

Since:
  • 1.0.0
Returns:
Name Type Description
object Object
Name Type Description
status_code String ENABLE.status.SUCCESS or
ENABLE.status.NOT_READY or
ENABLE.status.INVALID_ARGUMENT

Type Definitions

Callback (object)

Callback function for ENABLE.cec.setEventCallback

Name Type Description
object Object
Name Type Description
event Object

Possible values of event:
ENABLE.cec.event.HDMI_CEC_STB_SELECTED
ENABLE.cec.event.HDMI_CEC_STB_UNSELECTED

Since:
  • 1.0.0