Re: [media] Moving forward with captions / subtitles

On Sun, Feb 14, 2010 at 12:53 PM, Eric Carlson <eric.carlson@apple.com> wrote:
>
>   I agree. I meant that if we use a <source> element to list tracks, it
> should be the same <source> element used by the audio/video element. If we
> extend "media" to include "lang" (or rather if we convince the CSS WG to
> extend it), it should be usable by the audio/video elements too.

Agree. Would you prefer it inside "media" rather than as an extra
attribute? We already have several elements in HTML5 that have a
"lang" attribute.


>   I agree that only one track *with a given role* should be chosen by the
> selection algorithm.

Yes, that's exactly what I meant! I was just about to write another
email clarifying this. That's actually the main reason to have "role"
IMO.


>> The two-level mechanism is already in the current proposal. I think it
>> is more flexible.
>
>   Yes, I was suggesting that we might want to have a third level, with a
> containing element for all of the <track> elements. It occurred to me that a
> containing element might be clearer as I was thinking about what the markup
> would look like in an element that several movie <source> elements as well
> as <track> elements:
>     <video>
>         <source media="accessibility(captions:yes audio-description:no)"
> src="A">
>         <source media="accessibility(captions:no audio-description:yes)"
> src="B">
>         <source src="C">
>
>         <tracks>
>             <track role="caption">
>                 <source type="text/srt" src="en-captions.srt" lang="en">
>                 <source type="text/srt" src="zh-captions.srt" lang="zh">
>             </track>
>
>             <track role="chapters">
>                 <source type="text/srt" src="en-chapters.srt" lang="en">
>                 <source type="text/srt" src="zh-chapters.srt" lang="zh">
>             </track>
>         </tracks>
>     </video>
>   Looking at it now am not at all certain it is necessary...

Ah, I see. That separates the external tracks from all the other stuff
we are introducing inside media elements. It might make sense if there
is more going into it. But the media <source>s aren't grouped together
either.

It does get worrying if you start writing it down in illogical order
with media <source>s interspersed between <track>s.


>   I think allowing a "src" attribute directly on a <track> is a good idea
> because it will make simple markup easier to write. We will never be able to
> prevent people from doing stupid things. We just need to define the resource
> selection algorithm precisely so it is clear what a UA should do when
> presented with stupid markup.

This makes the idea of having a <tracks> grouping attribute actually
even more compelling. The media <source>s have a strict top-down
order, whereas the <track>s are parallel choices. That would make a
mixed descriptions rather difficult to read, parse and understand.

Should I go ahead and add to the "track" the potential use of "src" and "type"?

Incidentally, FWIW, there is already a draft resource selection
algorithm in the wiki page:
http://www.w3.org/WAI/PF/HTML/wiki/Media_TextAssociations#Resource_selection_algorithm
.

Cheers,
Silvia.

Received on Sunday, 14 February 2010 06:52:28 UTC