cec

The cec object lets you send messages over CEC (Consumer Electronics Control).

cec IDL

interface ReceiveEvent { attribute String type; attribute Array<byte> data; }; callback ReceiveEventCallback = void (ReceiveEvent event); interface Cec { Promise<void> send(Array<byte> data); void addEventListener(String type, ReceiveEventCallback callback); void removeEventListener(String type, ReceiveEventCallback callback); };

ON THIS PAGE





Object Creation

To create a cec object, load the @brightsign/cec module using the require() method. 

var cecClass = require("@brightsign/cec"); var cec = new cecClass();

Cec

Event

  • ReceiveEvent:  The CEC reception path is implemented as a receive event. The receive message has two generic fields:

    • type:  The event type "receive"

    • data:  Array<byte> CEC frame

Method

send()
Promise<void> send(Array<byte> data)

Sends messages over cec.

  • data Array<byte> : The CEC frame

port_name ()

The parameters for this optional argument are:

  • default: The default output for the platform, normally HDMI-1

  • HDMI-X: X is a number from 1 up to the number of HDMI® outputs on the platform

  • eARC: The default for the AU335 

Note

As of BrightSignOS 8.2.55, the CEC implementation for AU series 5 products will reply to these messages with the correct data, without involving the script:

  • CEC_MSG_GET_CEC_VERSION

  • CEC_MSG_ABORT

  • CEC_MSG_GIVE_DEVICE_POWER_STATUS

  • CEC_MSG_GIVE_OSD_NAME

  • CEC_MSG_GIVE_DEVICE_VENDOR_ID

  • CEC_MSG_GIVE_FEATURES

  • CEC_MSG_GIVE_PHYSICAL_ADDR

  • CEC_MSG_USER_CONTROL_PRESSED

  • CEC_MSG_USER_CONTROL_RELEASED

  • CEC_MSG_REPORT_PHYSICAL_ADDR

Example

To send or receive CEC messages: