Method Summary
| getCecDevices ( ) → Array.<ToiHdmiService.ToiCecInfo> | Discovers other devices which are connected to the CEC bus. |
| getCecFeatures ( ) → Array.<ToiHdmiService.ToiCecFeatureInfo> | All CEC features that can be enabled (by the current HW/configuration) are returned. |
| getSinkInfo ( ) → sinkInfo |
Returns the HDMI sink information. |
|
sendCecUserControlPressed
(
|
Used for CEC remote control pass through when the remote control buttons are pressed. |
|
sendCecUserControlReleased
(
|
This method is used for the CEC remote control pass through. The application shall call this method when the remote control button is released. It sends "User control released" to the HDMI sink. |
|
sendCecWakeup
(
|
This method shall be used to take advantage of the One Touch Play feature. It will wake up the attached HDMI sink and tell it to use the STB as the active source. |
|
setCecFeatures
(
|
The method is used to enable or disable CEC features. It shall only change the provided features. |
Inherited Methods
|
addEventListener
(
|
This method registers an event listener for a specific event. Multiple listeners can be added for the same event. Events are broadcast to all registered listeners. |
|
removeEventListener
(
|
This method removes an event listener for a specific event. |
Type Definitions
- CEC_LOGICAL_ADDRESS_AUDIOSYS
- CEC_LOGICAL_ADDRESS_BROADCAST
- CEC_LOGICAL_ADDRESS_PLAYBACK1
- CEC_LOGICAL_ADDRESS_PLAYBACK2
- CEC_LOGICAL_ADDRESS_PLAYBACK3
- CEC_LOGICAL_ADDRESS_RECORDER1
- CEC_LOGICAL_ADDRESS_RECORDER2
- CEC_LOGICAL_ADDRESS_RECORDER3
- CEC_LOGICAL_ADDRESS_SPECIALUSE
- CEC_LOGICAL_ADDRESS_TUNER1
- CEC_LOGICAL_ADDRESS_TUNER2
- CEC_LOGICAL_ADDRESS_TUNER3
- CEC_LOGICAL_ADDRESS_TUNER4
- CEC_LOGICAL_ADDRESS_TV
|
CEC feature definition. |
|
|
Defines the CEC logical address as specified in CEC Table 5 in HDMI specification version 1.4a. |
|
|
|
|
|
Remote control pass through user interface command. |
|
|
HDMI connection status information. |
|
|
The HDCP status information. |
|
Events
Methods
This method registers an event listener for a specific event. Multiple listeners can be added for the same event. Events are broadcast to all registered listeners.
Inherited From:
Parameters:
-
Name Type Description typenumber The event type of the event to subscribe to.
listenerToiEventListener The JavaScript function that will receive events.
Throws:
-
ToiInvalidArgumentException Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the application calls addEventListener with the same combination of type and listener twice.
This method is used for the application to know what other devices that are connected to the CEC bus.
Throws:
-
ToiOperationNotSupportedException Raised if the STB does not support CEC.
Returns:
-
Type: Array.<ToiHdmiService.ToiCecInfo>
The information list of the CEC devices which are connected to the CEC bus.
The method is used to check the status of the CEC features. All CEC features that can be enabled (by current HW/configuration) are returned.
Returns:
-
Type: Array.<ToiHdmiService.ToiCecFeatureInfo>
The status of all the features that the STB supports.
Returns the HDMI sink information.
Returns:
-
Type: ToiHdmiService.ToiSinkInfo
The HDMI sink information.
This method removes an event listener for a specific event.
Inherited From:
Parameters:
-
Name Type Description typenumber The event type of the event to remove the listener from.
listenerToiEventListener The JavaScript function that was previously added as an event listener.
Throws:
-
ToiInvalidArgumentException Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the listener has not previously been added.
This method is used for the CEC remote control pass through when the remote control button is pressed. It sends "User control pressed" and remote control UI command to the HDMI sink. When the user presses and holds the same remote control button for a long time, the application shall call ToiHdmiService#sendCecUserControlPressed with the same UI command repeatedly. In this case, the application need not call ToiHdmiService#sendCecUserControlReleased, but it shall call ToiHdmiService#sendCecUserControlReleased immediately when the user releases the key.
Parameters:
-
Name Type Description destinationToiHdmiService.ToiCecLogicalAddress The CEC logical address of destination.
uiCommandToiHdmiService.ToiCecUiCommand The user interface command.
Throws:
-
ToiInvalidArgumentException Raised if the uicommand is invalid.
ToiInvalidPreconditionException Raised if HDMI is disconnected.
ToiOperationNotSupportedException Raised if the STB does not support CEC or the feature is not supported.
This method is used for the CEC remote control pass through. The application shall call this method when the remote control button is released. It sends "User control released" to the HDMI sink.
Parameters:
-
Name Type Description destinationToiHdmiService.ToiCecLogicalAddress The CEC logical address of destination.
Throws:
-
ToiInvalidPreconditionException Raised if HDMI is disconnected.
ToiOperationNotSupportedException Raised if the STB does not support CEC or the feature is not supported.
This method shall be used to take advantage of the One Touch Play feature. It will wake up the attached HDMI sink and tell it to use the STB as the active source.
Parameters:
-
Name Type Description destinationToiHdmiService.ToiCecLogicalAddress The CEC logical address of destination.
Throws:
-
ToiInvalidPreconditionException Raised if HDMI is disconnected.
ToiOperationNotSupportedException Raised if the STB does not support CEC.
The method is used to enable or disable CEC features. It shall only change the provided features.
Parameters:
-
Name Type Description featuresArray.<ToiHdmiService.ToiCecFeatureInfo> The features to be enabled or disabled.
Throws:
-
ToiInvalidArgumentException Raised if any of the features is invalid.
ToiOperationNotSupportedException Raised if the STB does not support one or more of the provided CEC features.
Members
This is an Event identifier for ToiHdmiCecActiveRequestedEvent.
Called when CEC active from standby is received and the application is in control of standby. The application should call ToiPowerControl#requestPowerProfile to initiate a power profile change request if the STB is in standby. If standby control has been delegated to the platform, this notification will not be sent. Instead a power profile change will automatically be requested.
This is an Event identifier for ToiHdmiCecDeviceInfoChangedEvent.
Called when CEC information of the devices on the CEC bus is changed.
This is an Event identifier for ToiHdmiCecFeatureStatusChangedEvent.
Called when any CEC feature status is changed.
This is an Event identifier for ToiHdmiCecStandbyRequestedEvent.
Called when CEC standby is received and the application is in control of standby. The application should call ToiPowerControl#requestPowerProfile to initiate a power profile change request if the STB is active. If standby control has been delegated to the platform, this notification will not be sent. Instead a power profile change will automatically be requested.
This is an Event identifier for ToiHdmiCecUserControlPressedEvent.
Called when CEC "User control pressed" message is received.
This is an Event identifier for ToiHdmiCecUserControlReleasedEvent.
Called when CEC "User control released" message is received.
This is an Event identifier for ToiHdmiConnectionStatusChangedEvent.
Called when HDMI output connection status has changed.
This is an Event identifier for ToiHdmiHdcpStatusChangedEvent.
Called when HDCP status of HDMI output has changed.
STB initiates remote control pass through.
STB follows remote control pass through from other CEC devices.
Technical Preview:
STB initiates system standby control.
STB follows system standby from other CEC devices.
Logical address for audio system.
Logical address for broadcast.
Logical address for playback1.
Logical address for playback2.
Logical address for playback3.
Logical address for recorder1.
Logical address for recorder2.
Logical address for recorder3.
Logical address for special usage.
Logical address for tuner1.
Logical address for tuner2.
Logical address for tuner3.
Logical address for tuner4.
Logical address for TV.
UI command to mute/unmute.
UI command to decrease the volume.
UI command to increase the volume.
HDMI sink is connected and capabilities are known.
HDMI sink is connected and capabilities are unknown/invalid.
HDMI sink is not connected.
HDMI connection status is unknown.
HDCP is disabled.
The HDMI display has general HDCP error other than the specific ones defined later.
HDMI display (including the HDCP) is being initialized.
The HDMI display is a non-HDCP-compliant device.
The HDMI device is a non-HDCP-compliant repeater.
HDCP on the HDMI display is working as specified.
The HDMI display is on the revocation list.
The HDMI repeater has general HDCP error other than the specific ones defined later.
HDCP on the HDMI repeater is working as specified.
The HDMI device is a repeater that has more than 127 sinks or 7 depth of sinks attached.
The CEC feature information.
Struct fields
| Name | Description |
|---|---|
| feature | The CEC feature. Type: ToiHdmiService.ToiCecFeature |
| isEnabled | True if the feature is enabled and false if the feature is disabled. Type: boolean |
The CEC information of the device on the CEC bus.
Struct fields
| Name | Description |
|---|---|
| logicalAddress | The CEC logical address of the device on the CEC bus. Type: ToiHdmiService.ToiCecLogicalAddress |
| osdName | The CEC OSD name of the device on the CEC bus. Type: string |
Manufacturer information from the EDID.
Struct fields
| Name | Description |
|---|---|
| name | Three character long manufacturer name as assigned by Microsoft. Type: string |
| productId | Product identifier assigned by manufacturer. Type: number |
| serialNumber | Serial number by manufacturer. Type: number |
| weekOfManufacture | Week of manufacture. Valid range is 1-54. Type: number |
| yearOfManufacture | Year of manufacture. Type: number |
Specifies the HDMI connection status and HDMI sink information.
Struct fields
| Name | Description |
|---|---|
| hdcpStatus | HDMI display HDCP status information. Type: ToiHdmiService.ToiHdcpStatus |
| manufacturerInfo | Manufacturer information from the EDID. Type: ToiHdmiService.ToiManufacturerInfo |
| rawEdid | Raw EDID of 4 blocks. Type: ToiHdmiService.ToiBinary |
| status | HDMI connection status. Type: ToiHdmiService.ToiConnectionStatus |
| supportedAudioFormats | List of supported audio formats. Type: Array.<ToiAudioOutputConfiguration.ToiAudioFormat> |
| supportedModes | List of supported video modes. Type: Array.<ToiVideoOutputConfiguration.ToiVideoMode> |