W3C home > Mailing lists > Public > public-html@w3.org > April 2013

Re: TextTrack API changes

From: Silvia Pfeiffer <silviapfeiffer1@gmail.com>
Date: Thu, 25 Apr 2013 08:23:25 +1000
Message-ID: <CAHp8n2n1JCTuu1ST6WkimPrgG0XeNizd7ARdLsj0GX83vUkb3g@mail.gmail.com>
To: Glenn Adams <glenn@skynav.com>
Cc: public-html <public-html@w3.org>, "Jerry Smith, (WINDOWS)" <jdsmith@microsoft.com>, Simon Pieters <simonp@opera.com>, Bob Lund <B.Lund@cablelabs.com>, "Mark Vickers @ Comcast" <mark_vickers@cable.comcast.com>
Firstly note that there never was a getCueAsText() API. If mpeg2 requires
one, then that would be specific to a Mpeg2Cue API and I recommend against
adding it to TextTrackCue.

I'm prepared to add the .text and getCueAsHTML() interfaces to TextTrackCue
if there is a definition of another XXXCue interface that has these. For
example SCCTrackCue could define these, assuming the track was a 708 track
and converted to SCC.

Until then, it is better to have these return undefined in new subclasses,
which can only happen if they are not given on TextTrackCue.

Silvia.
 On 25 Apr 2013 08:05, "Glenn Adams" <glenn@skynav.com> wrote:

>
> On Wed, Apr 24, 2013 at 2:43 PM, Simon Pieters <simonp@opera.com> wrote:
>
>> On Wed, 24 Apr 2013 18:25:22 +0200, Bob Lund <B.Lund@cablelabs.com>
>> 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 text<http://www.w3.org/TR/2012/CR-html5-20121217/embedded-content-0.html#text-track-cue-text>
>  of the text track cue<http://www.w3.org/TR/2012/CR-html5-20121217/embedded-content-0.html#text-track-cue>
>  that the TextTrackCue<http://www.w3.org/TR/2012/CR-html5-20121217/embedded-content-0.html#texttrackcue>
>  object represents. On setting, the text track cue text<http://www.w3.org/TR/2012/CR-html5-20121217/embedded-content-0.html#text-track-cue-text>
>  must be set to the new value.
>
> The getCueAsHTML() method must convert the text track cue text<http://www.w3.org/TR/2012/CR-html5-20121217/embedded-content-0.html#text-track-cue-text>
>  to a DocumentFragment<http://www.w3.org/TR/2012/CR-html5-20121217/infrastructure.html#documentfragment>
>  for the script's document<http://www.w3.org/TR/2012/CR-html5-20121217/webappapis.html#script's-document>
>  of the entry script<http://www.w3.org/TR/2012/CR-html5-20121217/webappapis.html#entry-script>,
> using the appropriate rules for doing so. For example, forWebVTT<http://www.w3.org/TR/2012/CR-html5-20121217/infrastructure.html#webvtt>,
> those rules are the WebVTT cue text parsing rules<http://www.w3.org/TR/2012/CR-html5-20121217/infrastructure.html#webvtt-cue-text-parsing-rules>
>  and the WebVTT cue text DOM construction rules<http://www.w3.org/TR/2012/CR-html5-20121217/infrastructure.html#webvtt-cue-text-dom-construction-rules>
> . [WEBVTT]<http://www.w3.org/TR/2012/CR-html5-20121217/references.html#refsWEBVTT>
> "
>
> 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.
>
> [1]
> http://www.w3.org/TR/2012/CR-html5-20121217/embedded-content-0.html#texttrackcue
>
>
>>
>> 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:23:56 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:16:32 UTC