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

Re: deficiency in javascript api for creating text track cues

From: Silvia Pfeiffer <silviapfeiffer1@gmail.com>
Date: Fri, 15 Feb 2013 15:02:55 +1100
Message-ID: <CAHp8n2kxzXCV=J7mNW_YK8Je8Ujc4WPyZxKMNh_+rkZqDPyD_A@mail.gmail.com>
To: GIDEON ISAAC <mad.gideon.isaac@hotmail.com>
Cc: w3 html5 forum <public-html@w3.org>
The value of position on a TextTrackCue is always interpreted as a
percentage.
So, when you say cue1.position=15; that means that you're setting position
to 15% of video width.
See:
http://www.w3.org/TR/html5/single-page.html#text-track-cue-text-position

HTH.

Cheers,
Silvia.

On Thu, Feb 14, 2013 at 2:32 AM, GIDEON ISAAC
<mad.gideon.isaac@hotmail.com>wrote:

>  I can create code like this, which works:
>
> var cue1 = new TextTrackCue(3.300,13.130, 'a subtitle');
>
>
>
> cue1.id = 'cue1';
>
>
>
> cue1.line = 8
>
>
>
> cue1.position = 15;
>
>
>
> myTextTrack.addCue(cue1);
>
> However, if I want to use PERCENTAGES, I have a problem.  I can's say
> cue1.position = '15%'.  The api doesn't allow it.  I think this is an
> omission.
> -- Gideon
>
>
Received on Friday, 15 February 2013 04:03:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 15 February 2013 04:03:45 GMT