This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 14929 - <track> use the same names in the DOM API as in WebVTT's cue settings
Summary: <track> use the same names in the DOM API as in WebVTT's cue settings
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 critical
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on: 14646
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-25 08:40 UTC by contributor
Modified: 2012-07-18 18:48 UTC (History)
5 users (show)

See Also:


Attachments

Description contributor 2011-11-25 08:40:30 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html
Multipage: http://www.whatwg.org/C#dom-texttrackcue-direction
Complete: http://www.whatwg.org/c#dom-texttrackcue-direction

Comment:
<track> use the same names in the DOM API as in WebVTT's cue settings

Posted from: 85.227.157.105 by simonp@opera.com
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/535.8 (KHTML, like Gecko) Chrome/17.0.942.0 Safari/535.8
Comment 1 Simon Pieters 2011-11-25 08:44:22 UTC
(In reply to http://www.w3.org/Bugs/Public/show_bug.cgi?id=14646#c7)
> Fair enough.
> 
> D: will become vertical: and the values will be changed to lr and rl
> L: will become line:
> T: will become position:
> S: will become size:
> A: will become align:

This sounds good.

However, I would like the settings and their exposure in the DOM API to be aligned, so that it's more obvious what things are called (compare with content attributes and IDL attributes in HTML). For instance, vertical: is "direction":"horizontal" | "vertical" | "vertical-lr" in the DOM API. It would be better if it were "vertical":"" | "rl" | "lr".
Comment 2 Simon Pieters 2011-11-25 08:53:04 UTC
snapToLines and the magical value "auto" are also a bit annoying, though I'm not sure what to do about them.
Comment 3 Ian 'Hixie' Hickson 2011-12-07 23:27:25 UTC
Yeah, I should examine what to do here. Unfortunately this blocks the other bug on an HTML spec change.
Comment 4 Ian 'Hixie' Hickson 2012-02-22 20:04:33 UTC
Ok, .alignment => .align is obvious low-hanging fruit, so let's definitely do that. Looking at the others...
Comment 5 contributor 2012-02-22 20:05:08 UTC
Checked in as WHATWG revision r7006.
Check-in comment: rename TextTrackCue.alignment to .align to match the setting name in VTT.
http://html5.org/tools/web-apps-tracker?from=7005&to=7006
Comment 6 Ian 'Hixie' Hickson 2012-02-22 20:07:18 UTC
I liked linePosition and textPosition, but I guess calling them 'line' and 'position' isn't so bad. It's better than changing VTT to use 'line-position:' and 'text-position:', I guess. And "text position" isn't any less ambiguous than "position" anyway.
Comment 7 contributor 2012-02-22 20:08:26 UTC
Checked in as WHATWG revision r7007.
Check-in comment: rename TextTrackCue.linePosition and .textPosition to .line and .position respectively to match the setting names in VTT.
http://html5.org/tools/web-apps-tracker?from=7006&to=7007
Comment 8 Ian 'Hixie' Hickson 2012-02-22 20:10:30 UTC
Having .vertical return "" for horizontal direction is a bit weird, but I guess it's ok too, since it means you can do

   if (cue.vertical) { /* vertical */ } else { /* horizontal */ }

...and yet get its exact value to work out what kind of vertical.
Comment 9 contributor 2012-02-22 20:12:04 UTC
Checked in as WHATWG revision r7008.
Check-in comment: rename TextTrackCue.direction to .vertical (and change the values accordingly) to match the setting names in VTT.
http://html5.org/tools/web-apps-tracker?from=7007&to=7008