The Configuration class
Support in HbbTV
Available since: HbbTV 1.0 (ETSI TS 102 796 V1.1.1, OIPF DAE V1.1)
Support for read-only access to the following properties is mandatory:
– preferredAudioLanguage
– preferredSubtitleLanguage
– preferredUILanguage
– countryId
The extensions to the Configuration class defined in clause A.2.20 shall be supported.
All other properties and methods are not included.
Comment
This class shall be extended with the following additional property.
readonly Boolean subtitlesEnabled |
Shall be set to false if subtitles are disabled by the terminal. When set to false, subtitle components that are selected using a video/broadcast object, A/V control object or HTML5 media element will not be presented. See also clause 10.2.7. |
The following property is added to the Configuration class.
readonly Boolean timeShiftSynchronized |
Returns a boolean indicating if the terminal is capable of maintaining synchronization between applications and A/V components during time-shift. A definition of synchronization between applications and A/V components can be found in clause 6.2.2.4. |
This class shall be extended with the following additional property.
readonly Boolean audioDescriptionEnabled |
Shall be set to false if audio description is disabled by the terminal, otherwise shall be set to true. If set to false, applications should not enable audio description using the component selection API of the supported media objects i.e. A/V Control object, video/broadcast object and HTML5 media elements. |
This class shall be extended with the following additional property:
readonly Number dtt_network_ids[] |
Returns the ordered list of DVB network_ids from the DTT channels, if any, that are included in the terminal’s channel list. If the terminal does not have a DTT receiver or no DTT channels are present in the channel list then the property shall be undefined. |
The following property is added to the Configuration class.
readonly String deviceId | ||||||||||||
NOTE 1: This property is named deviceId for historical reasons but it does not return a permanent identifier for the device. Returns either a string representing a distinctive identifier that is unique for the combination of the terminal and the HTML document origin or a status code. The distinctive identifier shall use a character set that is restricted to alphanumeric characters and the hyphen. The status code shall be a number preceded by the ‘#’ character. Valid status codes are:
NOTE 2: Other status codes may be defined in future versions of the present document. The value of this property may change after a call to requestAccessToDistinctiveIdentifier, a change to the user option, a request by the user to generate a new distinctive identifier or some other event. |
The following method is added to the Configuration class.
requestAccessToDistinctiveIdentifier(function callback) | |
Description | Calls the callback with true as the first argument if the deviceId property contains a distinctive identifier, otherwise calls the callback with false as the first argument. This callback takes place either immediately or after a user interaction according to the following rules. Calls to this method while a callback is outstanding shall be ignored. If this method is supported, the terminal shall provide some native UI that requests the user to grant access to the distinctive identifier for the calling application. The terminal may persistently store the user response between invocations of the application. If the deviceId property contains the value “#1”, the terminal shall display this native UI when this method is called. The callback shall be called only after the UI is removed and the argument shall reflect the updated state of the deviceId property following the interaction with the user. This method call shall not block while the UI is displayed. If the deviceId property contains a different status code, the terminal shall not display the native UI and shall immediately call the callback with false as the first argument. If the deviceId property already contains a distinctive identifier, the terminal shall not display the native UI and shall immediately call the callback with true as the first argument. |
The Configuration object allows configuration items within the system to be read and modified. This includes settings such as audio and subtitle languages, display aspect ratios and other similar settings. Unlike the LocalSystem object, this is concerned with software- and application-related settings rather than hardware configuration and control.
Properties
String countryId |
An ISO-3166 three character country code identifying the country in which the receiver is deployed. |
Integer pvrSaveEpisodes |
When the pvrPolicy property is set to the value 2, this property indicates the minimum number of episodes that SHALL be saved for series-link recordings. |
Integer pvrSaveDays |
When the pvrPolicy property is set to the value 2, this property indicates the minimum save time (in days) for individual recordings. Only recordings older than the save time MAY be deleted. |
Integer pvrStartPadding |
The default padding (measured in seconds) to be added at the start of a recording. |
Integer pvrEndPadding |
The default padding (measured in seconds) to be added at the end of a recording. |
Integer preferredTimeShiftMode |
The time shift mode indicates the preferred mode of operation for support of timeshift playback in the video/broadcast object. Valid values are defined in the timeShiftMode property in section 7.13.2.2. The default value is 0, timeshift is turned off. |
Methods
String getText( String key ) | ||
Description | Get the system text string that has been set for the specified key. | |
Arguments | key | A key identifying the system text string to be retrieved. |
void setText( String key, String value ) | ||||||||||
Description | Set the system text string that has been set for the specified key. System text strings are used for automatically-generated messages in certain cases, e.g. parental control messages. | |||||||||
Arguments | key | The key for the text string to be set. Valid keys are:
| ||||||||
value | The new value for the system text string. |