Re: TextTracueCue Constructor

On Fri, Aug 9, 2013 at 9:48 AM, Glenn Adams <glenn@skynav.com> wrote:

>
> On Fri, Aug 9, 2013 at 8:59 AM, Victor Carbune <victor.carbune@gmail.com>wrote:
>
>> On Fri, Aug 9, 2013 at 12:09 PM, Silvia Pfeiffer
>> <silviapfeiffer1@gmail.com> wrote:
>> > On Fri, Aug 9, 2013 at 1:05 PM, Glenn Adams <glenn@skynav.com> wrote:
>> >>
>> >> On Thu, Aug 8, 2013 at 8:29 PM, Silvia Pfeiffer <
>> silviapfeiffer1@gmail.com>
>> >> wrote:
>> >>> I decided to just have the regionId on VTTCue for now. This can be
>> >>> changed if we decide in the HTML spec to also introduce regions. For
>> >>> now it's a WebVTT-only feature.
>> >>
>> >>
>> >> ok
>> >
>> > Admittedly, I've still got it the regions as TextTrackRegion in the VTT
>> spec.
>> > http://dev.w3.org/html5/webvtt/#texttrackregion-interface
>> > I could rename it to VTTRegion.
>> >
>> > What do ppl think?
>>
>> Renaming it to VTTRegion sounds appropriate to me, especially since it
>> seems to remain specific to VTT.
>>
>
> Although it is likely that a TTMLRegion will be needed, in which case a
> common TextTrackRegion would be desirable, we aren't quite at a point at
> which we can concretely define the specifics of TTMLRegion.
>
> I would recommend defining a very light weight TextTrackRegion interface
> now rather than later, and have VTTRegion inherit from it. The only certain
> common property is an id, so you might consider defining regionId on
> TextTrackRegion, and the remaining members on VTTRegion as presently
> specified.
>

I meant to say "id" rather than "regionId". Also, the back-pointer to the
track would be useful as a common property. So I would suggest you define
as follows:


interface TextTrackRegion : EventTarget {
  readonly attribute TextTrack? track
<https://dvcs.w3.org/hg/text-tracks/raw-file/default/webvtt/webvtt.html#dfn-dom-texttrackregion-track>;
           attribute DOMString id
<https://dvcs.w3.org/hg/text-tracks/raw-file/default/webvtt/webvtt.html#dfn-dom-texttrackregion-id>;
};



[Constructor]
interface VTTRegion : TextTrackRegion {
           attribute double width
<https://dvcs.w3.org/hg/text-tracks/raw-file/default/webvtt/webvtt.html#dfn-dom-texttrackregion-width>;
           attribute long lines
<https://dvcs.w3.org/hg/text-tracks/raw-file/default/webvtt/webvtt.html#dfn-dom-texttrackregion-lines>;
           attribute double regionAnchorX
<https://dvcs.w3.org/hg/text-tracks/raw-file/default/webvtt/webvtt.html#dfn-dom-texttrackregion-regionanchorx>;
           attribute double regionAnchorY
<https://dvcs.w3.org/hg/text-tracks/raw-file/default/webvtt/webvtt.html#dfn-dom-texttrackregion-regionanchory>;
           attribute double viewportAnchorX
<https://dvcs.w3.org/hg/text-tracks/raw-file/default/webvtt/webvtt.html#dfn-dom-texttrackregion-viewportanchorx>;
           attribute double viewportAnchorY
<https://dvcs.w3.org/hg/text-tracks/raw-file/default/webvtt/webvtt.html#dfn-dom-texttrackregion-viewportanchory>;
           attribute DOMString scroll
<https://dvcs.w3.org/hg/text-tracks/raw-file/default/webvtt/webvtt.html#dfn-dom-texttrackregion-scroll>;
};

Received on Friday, 9 August 2013 21:33:39 UTC