Available since firmware version 8.
Description
roCECStatusEvent determines active source status for set boxes. Channels subscribing to the roCECStatusEvent will be notified when the active-source status of the device changes per the CEC message traffic.
To use the roCECStatusEvent, follow the steps below:
- Connect a Roku STB to a TV which transmits and receives CEC messages
- Select the HDMI input to which the STB is connected
- Switch away and then back to the STB's HDMI input
API Overview
roCECStatusEvent
Field | Type | Key | Value | Use |
---|---|---|---|---|
roCECStatusEvent | AssociativeArray | Active | Boolean | “true” when the device is in the active source “false” when the device is not the active source |
ifCECStatus.IsActiveSource()
Add ifCECStatus.IsActiveSource() to indicate the current active-source status of the device.
Field | Value | Use |
---|---|---|
ifCECStatus.IsActiveSource | Boolean | "true" when the device is the active source "false" when the device is not the active source |
Subscription
A BrightScript app subscribes to roCECStatusEvent by creating an "roCECStatus" object. For example:
cecstatus = CreateObject("roCECStatus")
m.port = CreateObject("roMessagePort")
cecstatus.SetMessagePort(m.port)
...
msg = wait(0, m.port)
msgType = type(msg)
if msgType = "roCECStatusEvent"
Expected Results
Channels subscribing to the Event will be notified when the active-source status of the device changes.