top

TvInfo API

To use Samsung Product API, 

<script type="text/javascript" src="$WEBAPIS/webapis/webapis.js"></script>

Should be loaded in index.html

 

This module defines the TV settings value functionalities provided by the Tizen Samsung TV Product API.

Since : 2.3

Product : TV, AV_BD

Table of Contents

  1. 1. Interfaces
    1. 1.1. TvInfoManagerObject
    2. 1.2. TvInfoManager
    3. 1.3. TvInfoCaptionChangeCallback
    4. 1.4. TvInfoChangeCallback
    5. 1.5. TvInfoMenuKey
    6. 1.6. TvInfoMenuValue
    7. 1.7. TvInfoKey
    8. 1.8. TvInfoValue
  2. 2. Full WebIDL

Summary of Interfaces and Methods

Interface Method
TvInfoManagerObject  
TvInfoManager DOMString getVersion ()
unsigned short getMenuValue (unsigned short key)
unsigned long addCaptionChangeListener (TvInfoCaptionChangeCallback listener, unsigned short key)
void removeCaptionChangeListener (unsigned long listenerId)
boolean isTvsPicSizeResized();
void showCaption(boolean show);
void registerInAppCaptionControl(boolean status);
TvInfoCaptionChangeCallback void onchange (TvInfoMenuKey key)
TvInfoChangeCallback void onchange (TvInfoKey key)
TvInfoMenuKey  
TvInfoMenuValue  
TvInfoKey  
TvInfoValue  

1. Interfaces

1.1. TvInfoManagerObject

Defines a WebApi object instance of the Tizen Samsung TV Product API.
The webapis.tvinfo object enables access to TvInfo API functionality.

[NoInterfaceObject]interface TvInfoManagerObject {
  readonly attribute TvInfoManager tvinfo;
};

  WebApi implements TvInfoManagerObject;

Attributes

1.2. TvInfoManager

Provides methods for TvInfo functionalities.

[NoInterfaceObject]interface TvInfoManager {
  attribute TvInfoMenuKey TvInfoMenuKey;
  attribute TvInfoMenuValue TvInfoMenuValue;
  attribute TvInfoKey TvInfoKey;
  attribute TvInfoValue TvInfoValue;

  DOMString getVersion();
  TvInfoMenuValue getMenuValue(TvInfoMenuKey key);
  unsigned long addCaptionChangeListener(TvInfoMenuKey key, TvInfoCaptionChangeCallback listener);
  void removeCaptionChangeListener(unsigned long listenerId);
  boolean isTvsPicSizeResized();
  void showCaption(boolean show);
  void registerInAppCaptionControl(boolean status);
};

Attributes

Methods

getVersion
Retrieves the plugin version number.

DOMString getVersion();

Since : 2.3

Product : TV, AV_BD

Return value:

Plugin version

Code example:


try {
  var value = webapis.tvinfo.getVersion();
  console.log("version value = " + value);
} catch (error) {
  console.log("error code = " + error.code);
}
getMenuValue
Retrieves the specified caption or subtitle menu key value.

TvInfoMenuValue getMenuValue(TvInfoMenuKey key);

Since : 2.3

Product : TV, AV_BD

Parameters:

  • key: Caption or subtitle menu key

Return value:

value

Exceptions:

  • WebAPIException
    • with error type TypeMismatchError, if an input parameter is not compatible with its expected type.

    • with error type InvalidValuesError, if any of the input parameters contain an invalid value. (Since plugin version 3.0)

Code example:


try {
  var value = webapis.tvinfo.getMenuValue(webapis.tvinfo.TvInfoMenuKey.CAPTION_ONOFF_KEY);
  console.log("menu value = " + value);
} catch (error) {
  console.log("error code = " + error.code);
}
addCaptionChangeListener
Registers a caption menu change listener callback.

unsigned long addCaptionChangeListener(TvInfoMenuKey key, TvInfoCaptionChangeCallback listener);

Since : 2.3

Product : TV, AV_BD

Parameters:

  • listener: TvInfoCaptionChangeCallback listener
  • key: Caption menu key

Return value:

Listener ID

Exceptions:

  • WebAPIException
    • with error type TypeMismatchError, if an input parameter is not compatible with its expected type.

    • with error type InvalidValuesError, if any input parameter contains an invalid value. (Since plugin version 3.0)

Code example:


var listener = function(key) {
  console.log("TVInfoCaptionChange");
}
try {
  var value = webapis.tvinfo.addCaptionChangeListener(webapis.tvinfo.TvInfoMenuKey.CAPTION_ONOFF_KEY, listener);
  console.log("listener id = " + value);
} catch (error) {
  console.log("error code = " + error.code);
}
removeCaptionChangeListener
Unregisters a caption menu change listener callback.

void removeCaptionChangeListener(unsigned long listenerId);

Since : 2.3

Product : TV, AV_BD

Parameters:

  • listenerId: TvInfoCaptionChangeCallback ID

Exceptions:

  • WebAPIException
    • with error type TypeMismatchError, if an input parameter is not compatible with its expected type.

    • with error type InvalidValuesError, if any input parameter contains an invalid value. (Since plugin version 3.0)

Code example:


try {
  webapis.tvinfo.removeCaptionChangeListener(listenerId); // Listener ID defined by addCaptionChangeListener
  console.log("listener id = " + value);
} catch (error) {
  console.log("error code = " + error.code);
}
isTvsPicSizeResized
Checks whether the picture size has been resized.

boolean isTvsPicSizeResized();

Since : 2.3

Product : TV, AV_BD

Return value:

Boolean value:
  • true: Yes
  • false: No

Exceptions:

  • WebAPIException
    • with error type NotSupportedError, if the device is a BD device.

Code example:


try {
  var flag = webapis.tvinfo.isTvsPicSizeResized();
  console.log("flag = " + flag);
} catch (error) {
  console.log("error code = " + error.code);
}
showCaption
If captions are switched on in the TV menu, controls the caption visibility state.
If captions are switched off in the TV menu, captions are not shown even if the application calls showCaption(true).

void showCaption(boolean show);

Since : 2.3

Product : TV, AV_BD

Parameters:

  • show: Boolean value

Exceptions:

  • WebAPIException
    • with error type TypeMismatchError, if an input parameter is not compatible with its expected type.

Code example:


try {    
  webapis.tvinfo.showCaption(true);
} catch (error) {    
  console.log("error code = " + error.code);  
}
registerInAppCaptionControl
Enables controlling caption display dynamically from within the application.
The application gains full permission to show and hide the captions.
When the application launches or resumes, call registerInAppCaptionControl(true).
When the application is sent to the background or deactivated states, you must call registerInAppCaptionControl(false).

void registerInAppCaptionControl(boolean status);

Since : 2.3

Product : TV, AV_BD

Parameters:

  • status: Enable or disable dynamic caption display control.

Exceptions:

  • WebAPIException
    • with error type TypeMismatchError, if an input parameter is not compatible with its expected type.

Code example:


try {    
  webapis.tvinfo.registerInAppCaptionControl(true);
} catch (error) {    
  console.log("error code = " + error.code);  
}

1.3. TvInfoCaptionChangeCallback

Defines a listener for caption setting change notifications.

[Callback = FunctionOnly, NoInterfaceObject]interface TvInfoCaptionChangeCallback {
  void onchange(TvInfoMenuKey key);
};

Methods

onchange
Callback method for caption setting change notifications.

void onchange(TvInfoMenuKey key);

Since : 2.3

Product : TV, AV_BD

Parameters:

  • key: TvInfoMenuValue value

Code example:


var onchange = function (key){
  console.log(" changed caption setting is = " + key);
};

1.4. TvInfoChangeCallback

Defines a listener for TV setting change notifications.

[Callback = FunctionOnly, NoInterfaceObject]interface TvInfoChangeCallback {
  void onchange(TvInfoKey key);
};

Methods

onchange
Callback method for TV setting change notifications.

void onchange(TvInfoKey key);

Since : 2.3

Product : TV, AV_BD

Parameters:

  • key: TvInfoKey value

Code example:


var onchange = function (key){
  console.log(" changed setting is = " + key);
};

1.5. TvInfoMenuKey

Defines constants for caption settings keys.

[NoInterfaceObject]interface TvInfoMenuKey {
  const unsigned long CAPTION_ONOFF_KEY = 0;
  const unsigned long CAPTION_MODE_KEY = 1;
  const unsigned long CAPTION_FONT_SIZE_KEY = 2;
  const unsigned long CAPTION_FONT_STYLE_KEY = 3;
  const unsigned long CAPTION_FG_COLOR_KEY = 4;
  const unsigned long CAPTION_FG_OPACITY_KEY = 5;
  const unsigned long CAPTION_BG_COLOR_KEY = 6;
  const unsigned long CAPTION_BG_OPACITY_KEY = 7;
  const unsigned long CAPTION_EDGE_TYPE_KEY = 8;
  const unsigned long CAPTION_EDGE_COLOR_KEY = 9;
  const unsigned long CAPTION_WINDOW_COLOR_KEY = 10;
  const unsigned long CAPTION_WINDOW_OPACITY_KEY = 11;
  const unsigned long ACCESSIBILITY_FOCUS_ZOOM = 12;
  const unsigned long ACCESSIBILITY_HIGH_CONTRAST = 13;
  const unsigned long SMARTHUB_CHANNEL_BOUND_APPS_TICKER = 14;
  const unsigned long VOICE_GUIDE_KEY = 15;
  const unsigned long SUBTITLE_ONOFF_KEY = 16;
  const unsigned long SUBTITLE_MODE_KEY = 17;
};

Constants

  • CAPTION_ONOFF_KEY
    Caption On/Off
    expected value TvInfoMenuValue
    const unsigned long CAPTION_OFF = 0;
    const unsigned long CAPTION_ON = 1;
  • CAPTION_MODE_KEY
    Caption mode. Default: Service 6
    expected value TvInfoMenuValue
    const unsigned long CAPTION_MODE_DEFAULT = 0;
    const unsigned long CAPTION_MODE_SERVICE1 = 1;
    const unsigned long CAPTION_MODE_SERVICE2 = 2;
    const unsigned long CAPTION_MODE_SERVICE3 = 3;
    const unsigned long CAPTION_MODE_SERVICE4 = 4;
    const unsigned long CAPTION_MODE_SERVICE5 = 5;
    const unsigned long CAPTION_MODE_SERVICE6 = 6;
    const unsigned long CAPTION_MODE_CC1 = 7;
    const unsigned long CAPTION_MODE_CC2 = 8;
    const unsigned long CAPTION_MODE_CC3 = 9;
    const unsigned long CAPTION_MODE_CC4 = 10;
    const unsigned long CAPTION_MODE_TEXT1 = 11;
    const unsigned long CAPTION_MODE_TEXT2 = 12;
    const unsigned long CAPTION_MODE_TEXT3 = 13;
    const unsigned long CAPTION_MODE_TEXT4 = 14;
  • CAPTION_FONT_SIZE_KEY
    Caption font size
    expected value TvInfoMenuValue
    const unsigned long CAPTION_SIZE_DEFAULT = 0;
    const unsigned long CAPTION_SIZE_SMALL = 1;
    const unsigned long CAPTION_SIZE_STANDARD = 2;
    const unsigned long CAPTION_SIZE_LARGE = 3;
    const unsigned long CAPTION_SIZE_EXTRA_LARGE = 4;
  • CAPTION_FONT_STYLE_KEY
    Caption font style. Default: Style 6
    expected value TvInfoMenuValue
    const unsigned long CAPTION_FONT_DEFAULT = 0;
    const unsigned long CAPTION_FONT_STYLE0 = 1;
    const unsigned long CAPTION_FONT_STYLE1 = 2;
    const unsigned long CAPTION_FONT_STYLE2 = 3;
    const unsigned long CAPTION_FONT_STYLE3 = 4;
    const unsigned long CAPTION_FONT_STYLE4 = 5;
    const unsigned long CAPTION_FONT_STYLE5 = 6;
    const unsigned long CAPTION_FONT_STYLE6 = 7;
  • CAPTION_FG_COLOR_KEY
    Caption text foreground color
    expected value TvInfoMenuValue
    const unsigned long CAPTION_COLOR_DEFAULT = 0;
    const unsigned long CAPTION_COLOR_WHITE = 1;
    const unsigned long CAPTION_COLOR_BLACK = 2;
    const unsigned long CAPTION_COLOR_RED = 3;
    const unsigned long CAPTION_COLOR_GREEN = 4;
    const unsigned long CAPTION_COLOR_BLUE = 5;
    const unsigned long CAPTION_COLOR_YELLOW = 6;
    const unsigned long CAPTION_COLOR_MAGENTA = 7;
    const unsigned long CAPTION_COLOR_CYAN = 8;
  • CAPTION_FG_OPACITY_KEY
    Caption text foreground opacity
    expected value TvInfoMenuValue
    const unsigned long CAPTION_OPACITY_SOLID = 0;
    const unsigned long CAPTION_OPACITY_FLASH = 1;
    const unsigned long CAPTION_OPACITY_TRANSLUCENT = 2;
    const unsigned long CAPTION_OPACITY_TRANSPARENT = 3;
    const unsigned long CAPTION_OPACITY_DEFAULT = 4;
    const unsigned long CAPTION_OPACITY_HIGHLY_TRANSLUCENT = 5;
    const unsigned long CAPTION_OPACITY_SLIGHTLY_TRANSLUCENT = 6;
  • CAPTION_BG_COLOR_KEY
    Caption text background color
    expected value TvInfoMenuValue
    const unsigned long CAPTION_COLOR_DEFAULT = 0;
    const unsigned long CAPTION_COLOR_WHITE = 1;
    const unsigned long CAPTION_COLOR_BLACK = 2;
    const unsigned long CAPTION_COLOR_RED = 3;
    const unsigned long CAPTION_COLOR_GREEN = 4;
    const unsigned long CAPTION_COLOR_BLUE = 5;
    const unsigned long CAPTION_COLOR_YELLOW = 6;
    const unsigned long CAPTION_COLOR_MAGENTA = 7;
    const unsigned long CAPTION_COLOR_CYAN = 8;
  • CAPTION_BG_OPACITY_KEY
    Caption text background opacity
    expected value TvInfoMenuValue
    const unsigned long CAPTION_OPACITY_SOLID = 0;
    const unsigned long CAPTION_OPACITY_FLASH = 1;
    const unsigned long CAPTION_OPACITY_TRANSLUCENT = 2;
    const unsigned long CAPTION_OPACITY_TRANSPARENT = 3;
    const unsigned long CAPTION_OPACITY_DEFAULT = 4;
    const unsigned long CAPTION_OPACITY_HIGHLY_TRANSLUCENT = 5;
    const unsigned long CAPTION_OPACITY_SLIGHTLY_TRANSLUCENT = 6;
  • CAPTION_EDGE_TYPE_KEY
    Caption text edge type
    expected value TvInfoMenuValue
    const unsigned long CAPTION_EDGE_NONE = 0;
    const unsigned long CAPTION_EDGE_RAISED = 1;
    const unsigned long CAPTION_EDGE_DEPRESSED = 2;
    const unsigned long CAPTION_EDGE_UNIFORM = 3;
    const unsigned long CAPTION_EDGE_DROP_SHADOWED = 4;
  • CAPTION_EDGE_COLOR_KEY
    Caption text edge color
    expected value TvInfoMenuValue
    const unsigned long CAPTION_COLOR_DEFAULT = 0;
    const unsigned long CAPTION_COLOR_WHITE = 1;
    const unsigned long CAPTION_COLOR_BLACK = 2;
    const unsigned long CAPTION_COLOR_RED = 3;
    const unsigned long CAPTION_COLOR_GREEN = 4;
    const unsigned long CAPTION_COLOR_BLUE = 5;
    const unsigned long CAPTION_COLOR_YELLOW = 6;
    const unsigned long CAPTION_COLOR_MAGENTA = 7;
    const unsigned long CAPTION_COLOR_CYAN = 8;
  • CAPTION_WINDOW_COLOR_KEY
    Caption text window color
    expected value TvInfoMenuValue
    const unsigned long CAPTION_COLOR_DEFAULT = 0;
    const unsigned long CAPTION_COLOR_WHITE = 1;
    const unsigned long CAPTION_COLOR_BLACK = 2;
    const unsigned long CAPTION_COLOR_RED = 3;
    const unsigned long CAPTION_COLOR_GREEN = 4;
    const unsigned long CAPTION_COLOR_BLUE = 5;
    const unsigned long CAPTION_COLOR_YELLOW = 6;
    const unsigned long CAPTION_COLOR_MAGENTA = 7;
    const unsigned long CAPTION_COLOR_CYAN = 8;
  • CAPTION_WINDOW_OPACITY_KEY
    Caption text window opacity
    expected value TvInfoMenuValue
    const unsigned long CAPTION_OPACITY_SOLID = 0;
    const unsigned long CAPTION_OPACITY_FLASH = 1;
    const unsigned long CAPTION_OPACITY_TRANSLUCENT = 2;
    const unsigned long CAPTION_OPACITY_TRANSPARENT = 3;
    const unsigned long CAPTION_OPACITY_DEFAULT = 4;
    const unsigned long CAPTION_OPACITY_HIGHLY_TRANSLUCENT = 5;
    const unsigned long CAPTION_OPACITY_SLIGHTLY_TRANSLUCENT = 6;
  • ACCESSIBILITY_FOCUS_ZOOM
    Focus zoom menu value
    expected value TvInfoMenuValue
    const unsigned long OFF = 0;
    const unsigned long ON = 1;
  • ACCESSIBILITY_HIGH_CONTRAST
    High Contrast menu value
    expected value TvInfoMenuValue
    const unsigned long OFF = 0;
    const unsigned long ON = 1;
  • SMARTHUB_CHANNEL_BOUND_APPS_TICKER
    Channel-bound apps ticker menu value
    expected value DOMString
    "OFF", "ON"
  • VOICE_GUIDE_KEY
    Voice guide menu value
    expected value TvInfoMenuValue
    const unsigned long OFF = 0;
    const unsigned long ON = 1;
  • SUBTITLE_ONOFF_KEY
    Subtitles On/Off
    expected value TvInfoMenuValue
    const unsigned long OFF = 0;
    const unsigned long ON = 1;
  • SUBTITLE_MODE_KEY
    Subtitle mode
    expected value TvInfoMenuValue
    const unsigned long SUBTITLE_NORMAL = 0;
    const unsigned long SUBTITLE_HEARING_IMMPEARED = 1;

1.6. TvInfoMenuValue

Defines constants for TV menu settings values.

[NoInterfaceObject]interface TvInfoMenuValue {
  const unsigned long OFF = 0;
  const unsigned long ON = 1;

  const unsigned long CAPTION_OFF = 0;
  const unsigned long CAPTION_ON = 1;

  const unsigned long CAPTION_MODE_DEFAULT = 0;
  const unsigned long CAPTION_MODE_SERVICE1 = 1;
  const unsigned long CAPTION_MODE_SERVICE2 = 2;
  const unsigned long CAPTION_MODE_SERVICE3 = 3;
  const unsigned long CAPTION_MODE_SERVICE4 = 4;
  const unsigned long CAPTION_MODE_SERVICE5 = 5;
  const unsigned long CAPTION_MODE_SERVICE6 = 6;
  const unsigned long CAPTION_MODE_CC1 = 7;
  const unsigned long CAPTION_MODE_CC2 = 8;
  const unsigned long CAPTION_MODE_CC3 = 9;
  const unsigned long CAPTION_MODE_CC4 = 10;
  const unsigned long CAPTION_MODE_TEXT1 = 11;
  const unsigned long CAPTION_MODE_TEXT2 = 12;
  const unsigned long CAPTION_MODE_TEXT3 = 13;
  const unsigned long CAPTION_MODE_TEXT4 = 14;

  const unsigned long CAPTION_SIZE_DEFAULT = 0;
  const unsigned long CAPTION_SIZE_SMALL = 1;
  const unsigned long CAPTION_SIZE_STANDARD = 2;
  const unsigned long CAPTION_SIZE_LARGE = 3;
  const unsigned long CAPTION_SIZE_EXTRA_LARGE = 4;

  const unsigned long CAPTION_FONT_DEFAULT = 0;
  const unsigned long CAPTION_FONT_STYLE0 = 1;
  const unsigned long CAPTION_FONT_STYLE1 = 2;
  const unsigned long CAPTION_FONT_STYLE2 = 3;
  const unsigned long CAPTION_FONT_STYLE3 = 4;
  const unsigned long CAPTION_FONT_STYLE4 = 5;
  const unsigned long CAPTION_FONT_STYLE5 = 6;
  const unsigned long CAPTION_FONT_STYLE6 = 7;

  const unsigned long CAPTION_COLOR_DEFAULT = 0;
  const unsigned long CAPTION_COLOR_WHITE = 1;
  const unsigned long CAPTION_COLOR_BLACK = 2;
  const unsigned long CAPTION_COLOR_RED = 3;
  const unsigned long CAPTION_COLOR_GREEN = 4;
  const unsigned long CAPTION_COLOR_BLUE = 5;
  const unsigned long CAPTION_COLOR_YELLOW = 6;
  const unsigned long CAPTION_COLOR_MAGENTA = 7;
  const unsigned long CAPTION_COLOR_CYAN = 8;

  const unsigned long CAPTION_OPACITY_SOLID = 0;
  const unsigned long CAPTION_OPACITY_FLASH = 1;
  const unsigned long CAPTION_OPACITY_TRANSLUCENT = 2;
  const unsigned long CAPTION_OPACITY_TRANSPARENT = 3;
  const unsigned long CAPTION_OPACITY_DEFAULT = 4;
  const unsigned long CAPTION_OPACITY_HIGHLY_TRANSLUCENT = 5;
  const unsigned long CAPTION_OPACITY_SLIGHTLY_TRANSLUCENT = 6;

  const unsigned long CAPTION_EDGE_NONE = 0;
  const unsigned long CAPTION_EDGE_RAISED = 1;
  const unsigned long CAPTION_EDGE_DEPRESSED = 2;
  const unsigned long CAPTION_EDGE_UNIFORM = 3;
  const unsigned long CAPTION_EDGE_DROP_SHADOWED = 4;

  const unsigned long SUBTITLE_NORMAL = 0;
  const unsigned long SUBTITLE_HEARING_IMMPEARED = 1;
};

Constants

  • OFF
    MenuValue Off
  • ON
    MenuValue On
  • CAPTION_OFF
    Caption Off
  • CAPTION_ON
    Caption On
  • CAPTION_MODE_DEFAULT
    Default Mode
  • CAPTION_MODE_SERVICE1
    Service 1
  • CAPTION_MODE_SERVICE2
    Service 2
  • CAPTION_MODE_SERVICE3
    Service 3
  • CAPTION_MODE_SERVICE4
    Service 4
  • CAPTION_MODE_SERVICE5
    Service 5
  • CAPTION_MODE_SERVICE6
    Service 6
  • CAPTION_MODE_CC1
    English(KOR Localset)
  • CAPTION_MODE_CC2
    Korean(KOR Localsel)
  • CAPTION_MODE_CC3
    US Localset only
  • CAPTION_MODE_CC4
    US Localset only
  • CAPTION_MODE_TEXT1
    Text 1
  • CAPTION_MODE_TEXT2
    Text 2
  • CAPTION_MODE_TEXT3
    Text 3
  • CAPTION_MODE_TEXT4
    Text 4
  • CAPTION_SIZE_DEFAULT
    Default
  • CAPTION_SIZE_SMALL
    Small
  • CAPTION_SIZE_STANDARD
    Standard
  • CAPTION_SIZE_LARGE
    Large
  • CAPTION_SIZE_EXTRA_LARGE
    ExtraLarge
  • CAPTION_FONT_DEFAULT
    Default
  • CAPTION_FONT_STYLE0
    Style 0
  • CAPTION_FONT_STYLE1
    Style 1
  • CAPTION_FONT_STYLE2
    Style 2
  • CAPTION_FONT_STYLE3
    Style 3
  • CAPTION_FONT_STYLE4
    Style 4
  • CAPTION_FONT_STYLE5
    Style 5
  • CAPTION_FONT_STYLE6
    Style 6
  • CAPTION_COLOR_DEFAULT
    Default
  • CAPTION_COLOR_WHITE
    White
  • CAPTION_COLOR_BLACK
    Black
  • CAPTION_COLOR_RED
    Red
  • CAPTION_COLOR_GREEN
    Green
  • CAPTION_COLOR_BLUE
    Blue
  • CAPTION_COLOR_YELLOW
    Yellow
  • CAPTION_COLOR_MAGENTA
    Magenta
  • CAPTION_COLOR_CYAN
    Cyan
  • CAPTION_OPACITY_SOLID
    Solid
  • CAPTION_OPACITY_FLASHING
    Flashing
  • CAPTION_OPACITY_TRANSLUCENT
    Translucent
  • CAPTION_OPACITY_TRANSPARENT
    Transparent
  • CAPTION_OPACITY_DEFAULT
    Default
  • CAPTION_OPACITY_HIGHLY_TRANSLUCENT
    Highly translucent
  • CAPTION_OPACITY_SLIGHTLY_TRANSLUCENT
    Slightly translucent
  • CAPTION_EDGE_NONE
    No edge
  • CAPTION_EDGE_RAISED
    Raised
  • CAPTION_EDGE_DEPRESSED
    Depressed
  • CAPTION_EDGE_UNIFORM
    Uniform
  • CAPTION_EDGE_DROP_SHADOWED
    Drop Shadow
  • SUBTITLE_NORMAL
    Normal subtitles
  • SUBTITLE_HEARING_IMMPEARED
    Subtitles for the hearing-immpeared

1.7. TvInfoKey

Defines constants for TV information keys.

[NoInterfaceObject]interface TvInfoKey {
  const unsigned long TV_VIEWER_BG_EXECUTABLE = 0;
};

Constants

  • TV_VIEWER_BG_EXECUTABLE
    Whether the application can be executed in the background

1.8. TvInfoValue

Defines constants for TV information values.

[NoInterfaceObject]interface TvInfoKey {
  const unsigned long TV_VIEWER_BG_EXECUTABLE = 0;
};

Constants

  • TV_VIEWER_BG_NOT_EXECUTABLE
    Background execution is not supported
  • TV_VIEWER_BG_EXECUTABLE
    Background execution is supported

2. Full WebIDL


module TvInfo {
  [NoInterfaceObject]interface TvInfoManagerObject {
    readonly attribute TvInfoManager tvinfo;
  };

  WebApi implements TvInfoManagerObject;

  [NoInterfaceObject]interface TvInfoManager {
    attribute TvInfoMenuKey TvInfoMenuKey;
    attribute TvInfoMenuValue TvInfoMenuValue;
    attribute TvInfoKey TvInfoKey;
    attribute TvInfoValue TvInfoValue;

    DOMString getVersion();
    TvInfoMenuValue getMenuValue(TvInfoMenuKey key);
    unsigned long addCaptionChangeListener(TvInfoMenuKey key, TvInfoCaptionChangeCallback listener);
    void removeCaptionChangeListener(unsigned long listenerId);
    boolean isTvsPicSizeResized();
    void showCaption(boolean show);
    void registerInAppCaptionControl(boolean status);
  };

  [Callback = FunctionOnly, NoInterfaceObject]interface TvInfoCaptionChangeCallback {
    void onchange(TvInfoMenuKey key);
  };

  [Callback = FunctionOnly, NoInterfaceObject]interface TvInfoChangeCallback {
    void onchange(TvInfoKey key);
  };

  [NoInterfaceObject]interface TvInfoMenuKey {
    const unsigned long CAPTION_ONOFF_KEY = 0;
    const unsigned long CAPTION_MODE_KEY = 1;
    const unsigned long CAPTION_FONT_SIZE_KEY = 2;
    const unsigned long CAPTION_FONT_STYLE_KEY = 3;
    const unsigned long CAPTION_FG_COLOR_KEY = 4;
    const unsigned long CAPTION_FG_OPACITY_KEY = 5;
    const unsigned long CAPTION_BG_COLOR_KEY = 6;
    const unsigned long CAPTION_BG_OPACITY_KEY = 7;
    const unsigned long CAPTION_EDGE_TYPE_KEY = 8;
    const unsigned long CAPTION_EDGE_COLOR_KEY = 9;
    const unsigned long CAPTION_WINDOW_COLOR_KEY = 10;
    const unsigned long CAPTION_WINDOW_OPACITY_KEY = 11;
    const unsigned long ACCESSIBILITY_FOCUS_ZOOM = 12;
    const unsigned long ACCESSIBILITY_HIGH_CONTRAST = 13;
    const unsigned long SMARTHUB_CHANNEL_BOUND_APPS_TICKER = 14;
    const unsigned long VOICE_GUIDE_KEY = 15;
    const unsigned long SUBTITLE_ONOFF_KEY = 16;
    const unsigned long SUBTITLE_MODE_KEY = 17;
  };

  [NoInterfaceObject]interface TvInfoMenuValue {
    const unsigned long OFF = 0;
    const unsigned long ON = 1;

    const unsigned long CAPTION_OFF = 0;
    const unsigned long CAPTION_ON = 1;

    const unsigned long CAPTION_MODE_DEFAULT = 0;
    const unsigned long CAPTION_MODE_SERVICE1 = 1;
    const unsigned long CAPTION_MODE_SERVICE2 = 2;
    const unsigned long CAPTION_MODE_SERVICE3 = 3;
    const unsigned long CAPTION_MODE_SERVICE4 = 4;
    const unsigned long CAPTION_MODE_SERVICE5 = 5;
    const unsigned long CAPTION_MODE_SERVICE6 = 6;
    const unsigned long CAPTION_MODE_CC1 = 7;
    const unsigned long CAPTION_MODE_CC2 = 8;
    const unsigned long CAPTION_MODE_CC3 = 9;
    const unsigned long CAPTION_MODE_CC4 = 10;
    const unsigned long CAPTION_MODE_TEXT1 = 11;
    const unsigned long CAPTION_MODE_TEXT2 = 12;
    const unsigned long CAPTION_MODE_TEXT3 = 13;
    const unsigned long CAPTION_MODE_TEXT4 = 14;

    const unsigned long CAPTION_SIZE_DEFAULT = 0;
    const unsigned long CAPTION_SIZE_SMALL = 1;
    const unsigned long CAPTION_SIZE_STANDARD = 2;
    const unsigned long CAPTION_SIZE_LARGE = 3;
    const unsigned long CAPTION_SIZE_EXTRA_LARGE = 4;

    const unsigned long CAPTION_FONT_DEFAULT = 0;
    const unsigned long CAPTION_FONT_STYLE0 = 1;
    const unsigned long CAPTION_FONT_STYLE1 = 2;
    const unsigned long CAPTION_FONT_STYLE2 = 3;
    const unsigned long CAPTION_FONT_STYLE3 = 4;
    const unsigned long CAPTION_FONT_STYLE4 = 5;
    const unsigned long CAPTION_FONT_STYLE5 = 6;
    const unsigned long CAPTION_FONT_STYLE6 = 7;

    const unsigned long CAPTION_COLOR_DEFAULT = 0;
    const unsigned long CAPTION_COLOR_WHITE = 1;
    const unsigned long CAPTION_COLOR_BLACK = 2;
    const unsigned long CAPTION_COLOR_RED = 3;
    const unsigned long CAPTION_COLOR_GREEN = 4;
    const unsigned long CAPTION_COLOR_BLUE = 5;
    const unsigned long CAPTION_COLOR_YELLOW = 6;
    const unsigned long CAPTION_COLOR_MAGENTA = 7;
    const unsigned long CAPTION_COLOR_CYAN = 8;

    const unsigned long CAPTION_OPACITY_SOLID = 0;
    const unsigned long CAPTION_OPACITY_FLASH = 1;
    const unsigned long CAPTION_OPACITY_TRANSLUCENT = 2;
    const unsigned long CAPTION_OPACITY_TRANSPARENT = 3;
    const unsigned long CAPTION_OPACITY_DEFAULT = 4;
    const unsigned long CAPTION_OPACITY_HIGHLY_TRANSLUCENT = 5;
    const unsigned long CAPTION_OPACITY_SLIGHTLY_TRANSLUCENT = 6;

    const unsigned long CAPTION_EDGE_NONE = 0;
    const unsigned long CAPTION_EDGE_RAISED = 1;
    const unsigned long CAPTION_EDGE_DEPRESSED = 2;
    const unsigned long CAPTION_EDGE_UNIFORM = 3;
    const unsigned long CAPTION_EDGE_DROP_SHADOWED = 4;

    const unsigned long SUBTITLE_NORMAL = 0;
    const unsigned long SUBTITLE_HEARING_IMMPEARED = 1;
  };

  [NoInterfaceObject]interface TvInfoKey {
    const unsigned long TV_VIEWER_BG_EXECUTABLE = 0;
  };

  [NoInterfaceObject]interface TvInfoValue {
    const unsigned long TV_VIEWER_BG_NOT_EXECUTABLE = 0;
    const unsigned long TV_VIEWER_BG_EXECUTABLE = 1;
  };
};