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 eventCorresponding DOM 2 eventDOM 2 Event properties
onComponentChangedComponentChangedBubbles: 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:

NameValueUse
COMPONENT_TYPE_VIDEO0Represents a video component. This constant is used for all video components regardless of encoding.
COMPONENT_TYPE_AUDIO1Represents an audio component. This constant is used for all audio components regardless of encoding.
COMPONENT_TYPE_SUBTITLE2Represents 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

AVComponentCollection getComponents( Integer componentType )

Description

If the set of components is known, returns a collection of AVComponent values representing the components of the specified type in the current stream. If componentType is set to null or undefined then all components are returned if they are known.

For a video/broadcast object, the set of components SHALL be known if the video/broadcast object is in the presenting state and MAY be known if the object is in other states. For an A/V Control object, the set of components SHALL be known if the A/V Control object is in the playing state and MAY be known if the object is in other states.

NOTE: In the case of broadcast MPEG-2 transport streams, this method returns in formation from the PMT but the PMT is not always accurate. Components may be signalled in the PMT which are not actually present all the time. Components may be present but carrying information inconsistent with the PMT, for example a secondary audio stream may be signalled but carrying a copy of the primary audio stream when content for the secondary audio has not been produced. Applications can use the getSIDescriptors() method defined in section 7.16.2.4 to obtain descriptors from the EIT where these subtleties are normally signalled. Exactly how they are “normally signalled” is generally market specific.

One or more of the components returned MAY be passed back to one of the other methods unchanged (e.g. selectComponent()).

If property preferredAudioLanguage in the Configuration object (refer to section 7.3.2 is set then a component is by default selected and is considered as an active component.

If property preferredSubtitleLanguage in the Configuration object (refer to section 7.3.2 is set and property subtitleEnabled in AVOutput class (refer to section 7.3.5.1) is enabled then a component is by default selected and is considered as an active component.

Arguments

componentType

The type of component to be returned , as represented by one of the constant values listed in section 7.16.5.1.1.

AVComponentCollection getCurrentActiveComponents( Integer componentType )

Description

If the set of components is known, returns a collection of AVComponent values representing the currently active components of the specified type that are being rendered. Otherwise returns undefined.

For a video/broadcast object, the set of components SHALL be known if the video/broadcast object is in the presenting state and MAY be known if the object is in other states. For an A/V Control object, the set of components SHALL be known if the A/V Control object is in the playing state and MAY be known if the object is in other states.

One or more of the components returned MAY be passed back to one of the other methods unchanged (e.g. selectComponent()).

Arguments

componentType

The type of currently active component to be returned. represented by one of the constant values listed in section 7.16.5.1.1.

void selectComponent( AVComponent component )

Description

Select the component that will be subsequently rendered when A/V playback starts or select the component for rendering if A/V playback has already started.

If playback has started, this SHALL replace any other components of the same type that are currently playing.

If property preferredAudioLanguage in the Configuration object (refer to section 7.3.2) is set then a component is by default selected and it is not necessary to perform selectComponent().

If property preferredSubtitleLanguage in the Configuration object (refer to section 7.3.2) is set and property subtitleEnabled in AVOutput class (refer to section 7.3.5.1) is enabled then a component is by default selected and it is not necessary to perform selectComponent().

Arguments

component

A component object available in the stream currently being played.

void unselectComponent( AVComponent component )

Description

Stop rendering of the specified component of the stream.

If property preferredAudioLanguage in the Configuration object (see section 7.3.2) is set then unselecting a specific component returns to the default preferred audio language.

If property preferredSubtitleLanguage in the Configuration object (see section 7.3.2) is set and property subtitleEnabled in AVOutput class (see section 7.3.5.1) is enabled then unselecting a specific component returns to the default preferred subtitle language. In order to stop rendering subtitles completely it is necessary to disable subtitles with property subtitleEnabled in AVOutput class.

Arguments

component

The component to be stopped.

void selectComponent( Integer componentType )

Description

If A/V playback has already started, start rendering the default component of the specified type in the current stream. This SHALL replace any other components of the same type that are currently playing.

If A/V playback has not started, the default component of the specified type will be subsequently rendered once playback does start.

Arguments

componentType

The type of component for which the default component should be rendered.

void unselectComponent( Integer componentType )

Description

If A/V playback has already started, stop rendering of the specified type of component. If A/V playback has not started, no components of the specified type will be subsequently rendered once playback does start.

Arguments

componentType

The type of component to be stopped.

Events

For the intrinsic event “onSelectedComponentChange”, corresponding DOM events SHALL be generated, in the following manner:

Intrinsic eventCorresponding DOM eventDOM Event properties
onSelectedComponentChangeSelectedComponentChangeBubbles: 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 String encoding

The encoding of the stream. The value of video format or audio format defined in section 3 of [OIPF_MEDIA2] SHALL be used. For subtitle components, the following values are used (all according to section 6 of [OIPF_MEDIA2]):

Value

Description

DVB-SUBT

DVB subtitles

EBU-SUBT

EBU Teletext based subtitles

CEA-SUBT

CEA-708C Closed Captions

3GPP-TT

3GPP Timed Text

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.