Re: deficiency in javascript api for creating text track cues

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 UTC