Extensions for playback of selected media components
Support in HbbTV
Available since: HbbTV 1.5 (ETSI TS 102 796 V1.2.1, OIPF DAE V1.2)
For mapping of the encoding property for MP4 FF content, the following additional sample track descriptions shall be included:
“hvc1” → “video/mp4”
“hev1” → “video/mp4”
The label property defined in clause A.2.13 shall be supported.
The selectComponent() and unselectComponent() methods shall be asynchronous.
The getComponents() method shall always return fresh information. For example, in the case of an MPEG-2 transport stream, after a change to the PMT. The property defined in clause A.2.17 shall be supported.
The value of the language property shall be either an ISO 639-1 [60] 2-character language code or an ISO 639‑2 [61] 3-character language code as defined by clause 8.4.2 of the OIPF DAE specification [1] as modified in the present document.
Comment
A.2.13 Extensions to the AVSubtitleComponent class
The following property shall be added to the AVSubtitleComponent class.
readonly String label |
The label identifies a component by a human readable short description. |
A.2.17 Notification of change of components
The video/broadcast and A/V Control object shall be extended with the following property.
function onComponentChanged |
This function is called when there is a change in the set of components in the current stream, i.e. the set of all components that would be returned by the getComponents() method. The specified function is called with one argument: • Integer componentType – The type of component for which there has been a change in the current stream, as represented by one of the constant values listed in clause 7.16.5.1.1 of the OIPF DAE specification [1]. If there has been a change for more than one type of component, this argument will take the value undefined. |
The video/broadcast and A/V Control object shall be extended with the following event.
Intrinsic event | Corresponding DOM 2 event | DOM 2 Event properties |
onComponentChanged | ComponentChanged | Bubbles: No Cancelable: No Context Info: componentType |
This section defines APIs for the selection of specific A/V components for playback.
NOTE: The term component may correspond to MPEG_2 components, but is not restricted to that.
Media playback extensions
Constants
The following constants are defined as properties on any objects implementing this section:
Name | Value | Use |
COMPONENT_TYPE_VIDEO | 0 | Represents a video component. This constant is used for all video components regardless of encoding. |
COMPONENT_TYPE_AUDIO | 1 | Represents an audio component. This constant is used for all audio components regardless of encoding. |
COMPONENT_TYPE_SUBTITLE | 2 | Represents a subtitle component. This constant is used for all subtitle components regardless of subtitle format. NOTE: A subtitle component may also be related to closed captioning as part of a video stream. |
Properties
function onSelectedComponentChanged( Integer componentType ) |
This function is called when there is a change in the set of components being presented. This may occur if one of the currently selected components is no longer available and an alternative is chosen based on user preferences, or when presentation has changed due to a different component or set of components being selected. OITFs MAY optimise event dispatch by dispatching a single event in response to several calls to selectComponent() or unselectComponent() made in rapid succession. The specified function is called with one argument: · Integer componentType – The type of component whose presentation has changed, as represented by one of the constant values listed in section 7.16.5.1.1. If more than one component type has changed, this argument will take the value undefined. |
Methods
Events
For the intrinsic event “onSelectedComponentChange”, corresponding DOM events SHALL be generated, in the following manner:
Intrinsic event | Corresponding DOM event | DOM Event properties |
onSelectedComponentChange | SelectedComponentChange | Bubbles: No Cancellable: No Context Info: componentType |
Note: this DOM event is directly dispatched to the event target, and will not bubble nor capture. Applications SHOULD NOT rely on receiving these events during the bubbling or the capturing phase. Applications that use DOM event handlers SHALL call the addEventListener() method on the video/broadcast object or AV Control object itself. The third parameter of addEventListener, i.e. “useCapture”, will be ignored.
The AVComponent class
AVComponent represents a component within a complete media stream – a single stream of video, audio or data that can be played or manipulated. This is not necessary for basic playback, record or EPG services. However, it provides a mechanism to get at extended streams for enhanced services.
For forward compatibility the DAE application SHALL check the value of the type property to ensure that it is accessing an AVComponent object of the correct type.
Properties
readonly Integer componentTag |
The component tag identifies a component. The component tag identifier corresponds to the component_tag in the component descriptor in the ES loop of the stream in the PMT [EN 300 468], or undefined if the component is not carried in an MPEG-2 TS. |
readonly Integer pid |
The MPEG Program ID (PID) of the component in the MPEG2-TS in which it is carried, or undefined if the component is not carried in an MPEG-2 TS. |
readonly Integer type |
Type of the component stream. Valid values for this field are given by the constants listed in section 7.16.5.1.1. |
readonly Boolean encrypted |
Flag indicating whether the component is encrypted or not. |
The AVVideoComponent class
The AVVideoComponent class implements the AVComponent interface.
Properties
readonly Number aspectRatio |
Indicates the aspect ratio of the video or undefined if the aspect ratio is not known. Values SHALL be equal to width divided by height, rounded to a float value with two decimals, e.g. 1.78 to indicate 16:9 and 1.33 to indicate 4:3. |
The AVAudioComponent class
The AVAudioComponent class implements the AVComponent interface.
Properties
readonly String language |
An ISO 639-2 language code representing the language of the stream, as defined in [ISO 639-2]. |
readonly Boolean audioDescription |
Has value true if the stream contains an audio description intended for people with a visual impairment, false otherwise. |
readonly Integer audioChannels |
Indicates the number of channels present in this stream (e.g. 2 for stereo, 5 for 5.1, 7 for 7.1). |
The AVSubtitleComponent class
The AVSubtitleComponent class implements the AVComponent interface.
Properties
readonly String language |
An ISO 639-2 language code representing the language of the stream, as defined in [ISO 639-2]. |
readonly Boolean hearingImpaired |
Has value true if the stream is intended for the hearing-impaired (e.g. contains a written description of the sound effects), false otherwise. |
The AVComponentCollection class
typedef Collection<AVComponent> AVComponentCollection
An AVComponentCollection represents a collection of AVComponent objects. See Annex K for the definition of the collection template.