Re: TextTrack API changes

On Wed, Apr 24, 2013 at 2:43 PM, Simon Pieters <> wrote:

> On Wed, 24 Apr 2013 18:25:22 +0200, Bob Lund <> wrote:
>  We've already implemented in-band captions for MPEG-2 TS where
>> getCueAsHTML returns a valid doc fragment for Cues containing 708 captions.
>> We've also implemented a UA that exposes all other MPEG-2 TS  text track
>> data as Base64 encoded text via getCueAsText for text tracks not recognized
>> by the UA. This is to provide Web applications with the opportunity to
>> handle text track formats not supported by the UA. There is at least one
>> 3rd party Web app developer that wants to make use of this feature.
> Since the specification for .text and .getCueAsHTML() are defined in terms
> of WebVTT, it would be useful with a proposed specification for these
> features for MPEG-2 TS 708 captions and for unsupported tracks.

The current language under [1] states:

"The text attribute, on getting, must return the raw text track cue
 of the text track
 that the TextTrackCue<>
 object represents. On setting, the text track cue
 must be set to the new value.

The getCueAsHTML() method must convert the text track cue
 to a DocumentFragment<>
 for the script's
 of the entry script<>,
using the appropriate rules for doing so. For example,
those rules are the WebVTT cue text parsing
 and the WebVTT cue text DOM construction
. [WEBVTT]<>

The first of these (text), is expressed independently of VTT; the second
(getCueAsHTML) is also written generically, "using the appropriate rules".
This covers non-VTT uses by delegating the definition of "appropriate
rules" to other specifications.

I do agree that it would be useful to add language specifying what the UA
should do if the text track format's rules are either unknown or not
supported. In this regard, I agree with Silvia that text should resolve to
undefined (or perhaps null) -- I have no preference. For getCueAsHTML(),
the same could apply.


> P.S. It would be helpful if you could use proper quoting in your emails.
> Thanks.
> --
> Simon Pieters
> Opera Software

Received on Wednesday, 24 April 2013 22:06:24 UTC