Display
The Display module allows screen configuration.
Screen Dimansions
Call setResolution and setAspectRatio to configure the correct dimensions for the screen.
Notice: Setting the screen resolutino to an unsupported value will result in a black screen. Always use the getSupportedResolutions function to get the list of supported resolutions.
Screen Color
Call setBrightness, setContrast, setSharpness, setHue, and setSaturation to configure the colors for your screen.
Members
AspectRatio
Enum for screen aspect ratio.
Properties:
| Name | Type | Description |
|---|---|---|
| ASPECT_AUTO | automatic aspect ratio. | |
| ASPECT_4_3 | 4:3 aspect ratio. | |
| ASPECT_16_9 | 16:9 aspect ratio. |
HdcpEvent
Enum for HDCP status.
Properties:
| Name | Type | Description |
|---|---|---|
| HDCP_HANDSHAKE_SUCCESS | HDCP handshake was successfully performed. | |
| HDCP_HANDSHAKE_FAILURE | HDCP handshake failed. |
HdmiEvent
Enum for HDMI status.
Properties:
| Name | Type | Description |
|---|---|---|
| HDMI_CONNECTED | HDMI is connected. | |
| HDMI_DISCONNECTED | HDMI is disconnected. |
onHdcpEvent
Signal fired when the HDCP status changes. The listener will be passed the following argument:
- An Enum value of type HdcpEvent.
onHdmiEvent
Signal fired when the HDMI status changes. The listener will be passed the following argument:
- An Enum value of type HdmiEvent.
Resolution
Enum for screen resolution.
Properties:
| Name | Type | Description |
|---|---|---|
| RESOLUTION_NTSC | NTSC | |
| RESOLUTION_PAL | PAL | |
| RESOLUTION_480P | 480p | |
| RESOLUTION_576I | 576i | |
| RESOLUTION_576P | 576p | |
| RESOLUTION_720P50 | 720p 50Hz | |
| RESOLUTION_720P60 | 720p 60Hz | |
| RESOLUTION_1080I50 | 1080i 50Hz | |
| RESOLUTION_1080I60 | 1080i 60Hz | |
| RESOLUTION_1080P23 | 1080p 23Hz | |
| RESOLUTION_1080P24 | 1080p 24Hz | |
| RESOLUTION_1080P50 | 1080p 50Hz | |
| RESOLUTION_1080P60 | 1080p 60Hz | |
| RESOLUTION_2160P24_UHD | 2160p 24Hz UHD | |
| RESOLUTION_2160P25_UHD | 2160p 25Hz UHD | |
| RESOLUTION_2160P30_UHD | 2160p 30Hz UHD | |
| RESOLUTION_2160P50_UHD | 2160p 50Hz UHD | |
| RESOLUTION_2160P60_UHD | 2160p 60Hz UHD | |
| RESOLUTION_2160P24_DCI | 2160p 24Hz DCI | |
| RESOLUTION_2160P25_DCI | 2160p 25Hz DCI | |
| RESOLUTION_2160P30_DCI | 2160p 30Hz DCI | |
| RESOLUTION_2160P50_DCI | 2160p 50Hz DCI | |
| RESOLUTION_2160P60_DCI | 2160p 60Hz DCI |
Methods
clearBootScreen()
Clears the boot logo off of the screen.
Returns:
| Type | Description |
|---|---|
| A promise. | No arguments are passed to the completion handler. |
getAspectRatio()
Get the screen aspect ratio.
Returns:
| Type | Description |
|---|---|
| A promise. | The completion handler will be passed the following arguments: - aspect_ratio: The current screen AspectRatio. |
getBrightness()
Get the current brightness value.
Returns:
| Type | Description |
|---|---|
| A promise. | The completion handler will be passed the following arguments: - value: The brightness value (0-100). |
getContrast()
Get the current contrast value.
Returns:
| Type | Description |
|---|---|
| A promise. | The completion handler will be passed the following arguments: - value: The contrast value (0-100). |
getEDID()
Retrieve the HDMI EDID info. The EDID info is returned as raw data and must be parsed on the application layer though 3rd party libraries or by the application logic.
Returns:
| Type | Description |
|---|---|
| A promise. | The completion handler will be passed the following arguments: - data: A Uint8Array with the raw EDID data. |
getHue()
Get the current hue value.
Returns:
| Type | Description |
|---|---|
| A promise. | The completion handler will be passed the following arguments: - value: The hue value (0-100). |
getResolution()
Get the screen resulution.
Returns:
| Type | Description |
|---|---|
| A promise. | The completion handler will be passed the following arguments: - resolution: The current screen Resolution. |
getPreferredResolutionFromTV()
Get the preferred screen resolution reported by TV.
Returns:
| Type | Description |
|---|---|
| A promise. | The completion handler will be passed the following arguments: - resolution: The preferred screen resolution reported by TV. |
getSaturation()
Get the current saturation value.
Returns:
| Type | Description |
|---|---|
| A promise. | The completion handler will be passed the following arguments: - value: The saturation value (0-100). |
getSharpness()
Get the current sharpness value.
Returns:
| Type | Description |
|---|---|
| A promise. | The completion handler will be passed the following arguments: - value: The sharpness value (0-100). |
getSupportedResolutions()
Get the screen's supported resolutions.
Returns:
| Type | Description |
|---|---|
| A promise. | The completion handler will be passed the following arguments: - resolutions: An array of supported screen Resolutions. |
isHdmiConnected()
Check if the HDMI is connected.
Returns:
| Type | Description |
|---|---|
| A promise. | The completion handler will be passed the following arguments: - value: true if HDMI is connected , false otherwise. |
setAspectRatio(aspect_ratio)
Set the screen aspect ratio.
Parameters:
| Name | Type | Description |
|---|---|---|
aspect_ratio | AspectRatio | The screen AspectRatio. |
Returns:
| Type | Description |
|---|---|
| A promise. | No arguments are passed to the completion handler. |
setBrightness(value)
Set the display brightness.
Parameters:
| Name | Type | Description |
|---|---|---|
value | Number | The desired brightness (0-100). |
Returns:
| Type | Description |
|---|---|
| A promise. | No arguments are passed to the completion handler. |
setContrast(value)
Set the display contrast.
Parameters:
| Name | Type | Description |
|---|---|---|
value | Number | The desired contrast (0-100). |
Returns:
| Type | Description |
|---|---|
| A promise. | No arguments are passed to the completion handler. |
setHue(value)
Parameters:
| Name | Type | Description |
|---|---|---|
value | Number | The desired hue (0-100). |
Returns:
| Type | Description |
|---|---|
| A promise. | No arguments are passed to the completion handler. |
setResolution(resolution)
Set the screen resolution.
Parameters:
| Name | Type | Description |
|---|---|---|
resolution | Resolution | The screen Resolution. |
Returns:
| Type | Description |
|---|---|
| A promise. | No arguments are passed to the completion handler. |
setSaturation(value)
Set the display saturation.
Parameters:
| Name | Type | Description |
|---|---|---|
value | Number | The desired satutation (0-100). |
Returns:
| Type | Description |
|---|---|
| A promise. | No arguments are passed to the completion handler. |
setSharpness(value)
Set the display sharpness.
Parameters:
| Name | Type | Description |
|---|---|---|
value | Number | The desired sharpness (0-100). |