Configuration class
A 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.
A configuration object is obtained from the application/oipfConfiguration embedded object.
Properties
| readonly String preferredAudioLanguage |
| A comma-separated set of languages to be used for audio playback, in order of preference. Each language is indicated by its ISO 639-2 language code, which is the three letter language code. For example English is ‘eng’. |
| readonly String preferredSubtitleLanguage |
| A comma-separated set of languages to be used for subtitle playback, in order of preference. Each language is indicated by its ISO 639-2 language code or as a wildcard specifier “ ***“.If the wildcard is included it will be the last item in the set. If no subtitle component in the content matches a language in this property and the wildcard is included then the first (lowest) subtitle component will be selected. |
| readonly String preferredUILanguage |
| A comma-separated set of languages to be used for the user interface of a service, in order of preference. Each language is indicated by its ISO 639-2 language code.. If present, the HTTP Accept-language header will contain the same languages as the preferredUILanguage property with the same order of preference. |
| readonly String countryId |
| An ISO-3166 three character country code identifying the country in which the HbbTV device is deployed. |
| readonly Boolean subtitlesEnabled |
Returns true if subtitles are enabled and false if subtitles are disabled on the HbbTV device. |
| readonly Boolean timeShiftSynchronized |
| Returns a boolean indicating if the terminal is capable of maintaining synchronization between applications and A/V components during time-shift. |
| readonly Boolean audioDescriptionEnabled |
| Returns false if audio description is disabled on the HbbTV device, otherwise will return 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. |
| readonly Number dtt_network_ids[] |
| Returns the ordered list of DVB network_ids from the DTT channels, if any, that are included in the HbbTV device’s channel list. If the device does not have a DTT receiver or no DTT channels are present in the channel list then the property will be undefined. |
| readonly String deviceId |
| Returns either a string representing a distinctive identifier that is unique for the combination of the device 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: #1 The terminal is configured to request explicit user approval for this application. The application may call requestAccessToDistinctiveIdentifier to obtain such approval even if this method has previously been called and the user did not grant access.#2 Access to the distinctive identifier is denied explicitly by the user following a previous call by the application to requestAccessToDistinctiveIdentifier. Further calls to requestAccessToDistinctiveIdentifier do not result in the user being asked again for approval. This is used by devices that restrict the number of times that an application may call this method.#3 Access to the distinctive identifier is denied in accordance with the user option setting. #4 Access to the distinctive identifier is denied by the terminal manufacturer, e.g. because the application provider and the terminal manufacturer have not entered into a suitable agreement covering such access. #5 Access to the distinctive identifier is denied as the application has not yet been activated. NOTE 1: This property is named deviceId for historical reasons but it does not return a permanent identifier for the device.NOTE 2: 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.NOTE 3: Other status codes may be defined in the future. |
Methods
| requestAccessToDistinctiveIdentifier(function callback) |
| If a device configuration requires user approval to access a distinctive identifier then this method can be called to request it. It should only be called when deviceId property returns the status code ‘#1’. The method calls the callback with true as the first argument if approval has been given to access a distinctive identifier, through the deviceId property or no approval is needed. Otherwise it calls the callback with false as the first argument. This callback takes place after any user interaction or immediately if there is no user interaction. Calls to this method while a callback is outstanding will be ignored. |