25.3.2231.6R ENABLE.preference

Members

static,constant ENABLE.preference.EDGE_DEPRESSED String

Paramter of ENABLE.preference.setCaptionStyle

Edge style: depressed on the right

static,constant ENABLE.preference.EDGE_NONE String

Paramter of ENABLE.preference.setCaptionStyle

Specify no edge style

static,constant ENABLE.preference.EDGE_RAISED String

Paramter of ENABLE.preference.setCaptionStyle

Edge style: raised on the right

static,constant ENABLE.preference.EDGE_RIGHT_DROP_SHADOW String

Paramter of ENABLE.preference.setCaptionStyle

Edge style: drop Shadow on the right

static,constant ENABLE.preference.EDGE_UNIFORM String

Paramter of ENABLE.preference.setCaptionStyle

Edge style: uniform on the right

static,constant ENABLE.preference.FONTSTYLE_ITALIC String

Paramter of ENABLE.preference.setCaptionStyle

Font style: italic

static,constant ENABLE.preference.FONTSTYLE_ITALIC_UNDERLINE String

Paramter of ENABLE.preference.setCaptionStyle

Font style: italic + underline

static,constant ENABLE.preference.FONTSTYLE_NORMAL String

Paramter of ENABLE.preference.setCaptionStyle

Font style: normal

static,constant ENABLE.preference.FONTSTYLE_UNDERLINE String

Paramter of ENABLE.preference.setCaptionStyle

Font style: underline

static,constant ENABLE.preference.RES_480I

Paramter of ENABLE.preference.setResolution

480i60 (720x480 two interlaced fields of 243 lines each)

static,constant ENABLE.preference.RES_480P

Paramter of ENABLE.preference.setResolution

480p60 (720x480 progressive scan)

static,constant ENABLE.preference.RES_576I

Paramter of ENABLE.preference.setResolution

576i50 (720x576 two interlaced fields of 288 lines each)

static,constant ENABLE.preference.RES_576P

Paramter of ENABLE.preference.setResolution

576p50 (720x576 progressive scan)

static,constant ENABLE.preference.RES_720P50

Paramter of ENABLE.preference.setResolution

720p50 (1280 × 720 progressive scan)

static,constant ENABLE.preference.RES_720P60

Paramter of ENABLE.preference.setResolution

720p60 (1280 × 720 progressive scan)

static,constant ENABLE.preference.RES_1080I50

Paramter of ENABLE.preference.setResolution

1080i50 (1920 × 1080 split into two interlaced fields of 540 lines)

static,constant ENABLE.preference.RES_1080I60

Paramter of ENABLE.preference.setResolution

1080i60 (1920 × 1080 split into two interlaced fields of 540 lines)

static,constant ENABLE.preference.RES_1080P24

Paramter of ENABLE.preference.setResolution

1080p24: 1080p (1920 × 1080 progressive scan), frame rate 24Hz

static,constant ENABLE.preference.RES_1080P25

Paramter of ENABLE.preference.setResolution

1080p25: 1080p (1920 × 1080 progressive scan), frame rate 25Hz

static,constant ENABLE.preference.RES_1080P30

Paramter of ENABLE.preference.setResolution

1080p30: 1080p (1920 × 1080 progressive scan), frame rate 30Hz

static,constant ENABLE.preference.RES_1080P50

Paramter of ENABLE.preference.setResolution

1080p50: 1080p (1920 × 1080 progressive scan), frame rate 50Hz

static,constant ENABLE.preference.RES_1080P60

Paramter of ENABLE.preference.setResolution

1080p60: 1080p (1920 × 1080 progressive scan), frame rate 60Hz

static,constant ENABLE.preference.RES_2160P24

Paramter of ENABLE.preference.setResolution

2160p24: 2160p (3840 × 2160 progressive scan), frame rate 24Hz

static,constant ENABLE.preference.RES_2160P25

Paramter of ENABLE.preference.setResolution

2160p25: 2160p (3840 × 2160 progressive scan), frame rate 25Hz

static,constant ENABLE.preference.RES_2160P30

Paramter of ENABLE.preference.setResolution

2160p30: 2160p (3840 × 2160 progressive scan), frame rate 30Hz

static,constant ENABLE.preference.RES_2160P50

Paramter of ENABLE.preference.setResolution

2160p50: 2160p (3840 × 2160 progressive scan), frame rate 50Hz

static,constant ENABLE.preference.RES_2160P60

Paramter of ENABLE.preference.setResolution

2160p60: 2160p (3840 × 2160 progressive scan), frame rate 60Hz

Methods

static ENABLE.preference.getAudioConfig () {Object}

Gets the user configuration for audio tracks.

Returns:
Name Type Description
object Object
Name Type Description
status_code String ENABLE.status.SUCCESS or
ENABLE.status.ERROR
[language] Array.<String> optional, Please refer to parameter of ENABLE.preference.setAudioConfig

static ENABLE.preference.getBestOutputMode () {Object}

Get best output mode status.

Returns:
Name Type Description
object Object
Name Type Description
status_code String ENABLE.status.SUCCESS or
ENABLE.status.ERROR
result Boolean Best output mode status

static ENABLE.preference.getCaptionStyle () {Object}

Get caption styles.
Please refer to parameter of ENABLE.preference.setCaptionStyle

Returns:
Name Type Description
object Object
Name Type Description
status_code String ENABLE.status.SUCCESS or
ENABLE.status.ERROR
size Number Size (dp) of the subtitle view
type String Font Family of the text
style String Font style of the text
text_color String RGB color code ("#RRGGBB") for the text
text_opacity Number Opacity (between 0 to 1) of the text_color
bg_color String RGB color code ("#RRGGBB") for the background
bg_opacity Number Opacity (between 0 to 1) of the bg_color
edge_type String Edge type of the caption
edge_color String RGB color code ("#RRGGBB") for the edge

static ENABLE.preference.getNTPConfig () {Object}

Get NTP config.

Returns:
Name Type Description
object Object
Name Type Description
enable Boolean Enable or disable NTP status
server String NTP server
status_code String ENABLE.status.SUCCESS or
ENABLE.status.ERROR

static ENABLE.preference.getResolution () {Object}

Get display resolution.

Remark:

  1. ENABLE.status.NOT_READY will be return if there is no hdmi connection and has not specify a resolution
Returns:
Name Type Description
object Object
Name Type Description
status_code String ENABLE.status.SUCCESS or
ENABLE.status.NOT_READY
ENABLE.status.ERROR
result String Please refer to parameter of ENABLE.preference.setResolution

static ENABLE.preference.getSystemLanguage () {Object}

Get the Android system language

Returns:
Name Type Description
object Object
Name Type Description
status_code String ENABLE.status.SUCCESS
result String isoLang ISO 639-3 language code (e.g. 'eng', 'spa', 'ger')

static ENABLE.preference.getTextConfig () {Object}

Gets the user configuration for text tracks.

Returns:
Name Type Description
object Object
Name Type Description
status_code String ENABLE.status.SUCCESS or
ENABLE.status.ERROR
[on] boolean optional, Please refer to parameter of ENABLE.preference.setTextPreference
[language] Array.<String> optional

static ENABLE.preference.getTimezoneId () {Object}

Get Android system timezone id

Returns:
Name Type Description
object Object
Name Type Description
status_code String ENABLE.status.SUCCESS or
ENABLE.status.ERROR
result String time_zone (e.g. "Europe/Paris", "America/Los_Angeles")

static ENABLE.preference.setAudioConfig (config) {Object}

Sets the user configuration for audio tracks. This config will be store persistently.
When Vermatrix is not enabled (default), Exoplayer will be selected. Only 1 language for can be chosen to be preferred.
Configuration will be reset to default if not provided.
Only language is currently supported.

var lang_pref_bibliographic = ["fre","spa","ger","dut"];
ENABLE.preference.setAudioConfig({ language: lang_pref_bibliographic });
Name Type Description
config Object
Name Type Description
language Array.<String>

Array of ISO 639-2 (B) code, language code at 0 index is the most preferred

Returns:
Name Type Description
object Object
Name Type Description
status_code String ENABLE.status.SUCCESS or
ENABLE.status.INVALID_ARGUMENT

static ENABLE.preference.setBestOutputMode (modeOn) {Object}

Set best output mode.

Remark:
Set to highest match resolution

Name Type Description
modeOn Boolean

Pass true to enable or false to disable best output mode

Returns:
Name Type Description
object Object
Name Type Description
status_code String ENABLE.status.SUCCESS or
ENABLE.status.INVALID_ARGUMENT

static ENABLE.preference.setCaptionStyle (config) {Object}

Set caption styles.

If the options is missing, it will revert to the default style

Name Type Description
config Object
Name Type Description
preview Boolean

Pass true to show preview or false to hide preview and save the config persistently

size Number

Size (dp) of the subtitle view

type String

Font Family of the text, currently these are supported:
- mono_sp_with_serifs
- prop_sp_with_serifs
- mono_sp_without_serifs
- prop_sp_without_serifs
- casual
- cursive
- small_capitals

style String

Font style of the text:
ENABLE.preference.FONTSTYLE_NORMAL or
ENABLE.preference.FONTSTYLE_ITALIC or
ENABLE.preference.FONTSTYLE_UNDERLINE or
ENABLE.preference.FONTSTYLE_ITALIC_UNDERLINE

text_color String

RGB color code ("#RRGGBB") for the text, e.g. "#FF00FF"

text_opacity Number

Opacity (between 0 to 1) of the text_color

bg_color String

RGB color code ("#RRGGBB") for the background, e.g. "#FF00FF"

bg_opacity Number

Opacity (between 0 to 1) of the bg_color

edge_type String

Edge type of the caption:
ENABLE.preference.EDGE_NONE or
ENABLE.preference.EDGE_RAISED or
ENABLE.preference.EDGE_UNIFORM or
ENABLE.preference.EDGE_DEPRESSED or
ENABLE.preference.EDGE_RIGHT_DROP_SHADOW

edge_color String

RGB color code ("#RRGGBB") for the edge, e.g. "#FF00FF"

Returns:
Name Type Description
object Object
Name Type Description
status_code String ENABLE.status.SUCCESS or
ENABLE.status.INVALID_ARGUMENT or
ENABLE.status.ERROR

static ENABLE.preference.setDateTime (date) {Object}

Set system date time manually. NTP sync will be disabled after setting this api.

var date = new Date(2022, 0, 9, 18, 40, 35); // 0 for January
ENABLE.preference.setDateTime(date);
Name Type Description
date Date

Js Date object.

Returns:
Name Type Description
object Object
Name Type Description
status_code String ENABLE.status.SUCCESS or
ENABLE.status.ERROR or
ENABLE.status.INVALID_ARGUMENT

static ENABLE.preference.setNTPConfig (config) {Object}

Set NTP config. Need reboot once to take effect.

ENABLE.preference.setNTPConfig({enable: true, server: "10.0.32.26"}) or
ENABLE.preference.setNTPConfig({enable: true, server: "time.android.com"})
Name Type Description
config Object
Name Type Description
enable Boolean

Enable or disable NTP

server String

NTP server, support both ip and domain name

Returns:
Name Type Description
object Object
Name Type Description
status_code String ENABLE.status.SUCCESS or
ENABLE.status.ERROR or
ENABLE.status.INVALID_ARGUMENT

static ENABLE.preference.setResolution (resolution) {Object}

Set display resolution.

Remark:
If the resolution does not match the color system, the system will not be persist,
and it will reset to the highest supported resolution on next hot plug event.

Name Type Description
resolution String

Aspect Ratio: one of
ENABLE.preference.RES_1080P24
ENABLE.preference.RES_1080P25
ENABLE.preference.RES_1080P30
ENABLE.preference.RES_1080P50
ENABLE.preference.RES_1080P60
ENABLE.preference.RES_1080I50
ENABLE.preference.RES_1080I60
ENABLE.preference.RES_720P50
ENABLE.preference.RES_720P60
ENABLE.preference.RES_576P
ENABLE.preference.RES_576I
ENABLE.preference.RES_480P
ENABLE.preference.RES_480I
ENABLE.preference.RES_2160P24
ENABLE.preference.RES_2160P25
ENABLE.preference.RES_2160P30
ENABLE.preference.RES_2160P50
ENABLE.preference.RES_2160P60

Returns:
Name Type Description
object Object
Name Type Description
status_code String ENABLE.status.SUCCESS or
ENABLE.status.ERROR or
ENABLE.status.INVALID_ARGUMENT

static ENABLE.preference.setSystemLanguage (isoLang) {Object}

Set the Android system language

Name Type Description
isoLang String

3 char ISO 639-3 language code (e.g. 'eng', 'spa', 'ger')

Returns:
Name Type Description
object Object
Name Type Description
status_code String ENABLE.status.SUCCESS or
ENABLE.status.ERROR or
ENABLE.status.INVALID_ARGUMENT

static ENABLE.preference.setTextConfig (config) {Object}

Sets the user configuration for text tracks. This config will be store persistently.
When Vermatrix is not enabled (default), Exoplayer will be selected. Only 1 language for can be chosen to be preferred.
Configuration will be reset to default if not provided.

var lang_pref_terminology = ["fra","spa","deu","nld"];
ENABLE.preference.setTextConfig({ on: true, language: lang_pref_terminology });
Name Type Description
config Object
Name Type Description
on boolean

true will select the first available text track if no other Config matched or set.
false (default) will not select any text track when playback started.

language Array.<String>

Array of ISO 639-2 (T) code, language code at 0 index is the most preferred.

Returns:
Name Type Description
object Object
Name Type Description
status_code String ENABLE.status.SUCCESS or
ENABLE.status.INVALID_ARGUMENT

static ENABLE.preference.setTimezone (timezone) {Object}

Set Android system timezone
There will be a short delay to applied the change.

Name Type Description
timezone String

Timezone name example: "Europe/Paris", "America/Los_Angeles"

Returns:
Name Type Description
object Object
Name Type Description
status_code String ENABLE.status.SUCCESS or
ENABLE.status.ERROR or
ENABLE.status.INVALID_ARGUMENT