- From: Eric Carlson <eric.carlson@apple.com>
- Date: Tue, 9 Mar 2010 11:42:08 -0800
- To: John Foliot <jfoliot@stanford.edu>
- Cc: 'HTML Accessibility Task Force' <public-html-a11y@w3.org>
On Mar 9, 2010, at 11:27 AM, John Foliot wrote:
> Hello All,
>
> Just a question (2 actually) for clarification:
>
> In the Media MultitrackAPI document there is reference to 'tracks' in the
> plural:
> <q>
> if (video.tracks[1].role == "caption") video.tracks[1].enabled =
> true;
> enables a caption track
>
> if (video.tracks[2].role == "subtitle" && video.tracks[2].language
> == "fr") video.tracks[2].enabled = true;
> enables a French subtitle track
> </q>
>
> However in the Media TextAssociations we introduce an element <track>:
> <q>
> <video src="video.ogv">
> <track src="video_tad.srt" type="text/srt" language="en"
> role="textaudesc"></track>
> </video>
> </q>
>
> *****
> Is this deliberate or intentional (mixing singular and plural)? Does it
> matter?
>
This is intentional - "tracks" is the proposed property on HTMLMediaElement, it returns a collection of 0 or more tracks:
interface HTMLMediaElement : HTMLElement {
...
readonly attribute MediaTracks tracks;
...
};
interface MediaTracks {
readonly attribute unsigned long length;
caller getter MediaTrack item(in unsigned long index);
caller getter MediaTrack namedItem(in DOMString name);
...
};
interface MediaTrack {
readonly attribute DOMString name;
readonly attribute DOMString role;
readonly attribute DOMString type;
readonly attribute DOMString media;
readonly attribute DOMString language;
attribute boolean enabled;
...
};
In other words, each track in a movie (internal and external) is represented by a MediaTrack. All of the tracks in a movie are in the MediaTracks collection.
eric
Received on Tuesday, 9 March 2010 19:42:40 UTC