Re: timing model of the media resource in HTML5

On Wed, Feb 3, 2010 at 5:00 PM, Silvia Pfeiffer
<silviapfeiffer1@gmail.com> wrote:
> On Fri, Jan 29, 2010 at 12:39 AM, Philip Jägenstedt <philipj@opera.com> wrote:
>>
>> On Wed, 27 Jan 2010 12:57:51 +0100, Silvia Pfeiffer <silviapfeiffer1@gmail.com> wrote:
>>>
>>> Now, let's talk about the <overlay> element.
>>>
> [snip]
>>>
>>> I would actually suggest that if we want to go with <overlay>, we need
>>> to specify different overlays for different types of text. In this way
>>> we can accommodate textual audio descriptions, captions, subtitles
>>> etc. Then, I would suggest that for every type of text there should
>>> every only be one <source> displayed. It is not often that you want
>>> more than one subtitle track displayed. You most certainly never want
>>> to have more than one caption track displayed and never more than one
>>> textual audio description track. But you do want each one of them
>>> displayed in addition to the other.
>>>
>>> For example:
>>>
>>> <video src="video.ogg">
>>>  <overlay role="caption"
>>> style="font-size:2em;padding:1em;text-align:center; display: block;">
>>>    <source src="en-us.srt" lang="en-US">
>>>    <source src="en.srt" lang="en">
>>>  </overlay>
>>>  <overlay role="tad" style="z-index: -100; display: block;"
>>> aria-live="assertive">
>>>    <source src="tad-en.srt" lang="en">
>>>    <source src="tad-de.srt" lang="de">
>>>  </overlay>
>>>  <overlay role="subtitle"
>>> style="font-size:2em;padding:1em;text-align:center; display: block;">
>>>    <source src="de.srt" lang="de">
>>>    <source src="sv.srt" lang="sv">
>>>    <source src="fi.srt" lang="fi">
>>>  </overlay>
>>> </video>
>>>
>>>
>>
>> I agree on adding something like role="". On the naming, Maciej pointed out
>> and I now agree that <overlay> is presentational and not really a brilliant
>> choice. I think this should be controlled by CSS in some way or anthoer.
>>
>> What we agree on so far seems to be:
>>
>> <video src="video">
>>  <sourcelist role="subtitle">
>>    <source src="subtitles.en.srt" lang="en">
>>  </sourcelist>
>> </video>
>>
>> Where <sourcelist> is whatever name we can agree on. Maybe something that
>> sounds like it has to do with timed text, I don't know.
>
> I'd like to take up this discussion again.
>
> What I liked about the <overlay> proposal at
> http://wiki.whatwg.org/wiki/Video_Overlay was that you also allowed
> for text to be dynamically introduced into the <overlay> element.
>
> <video src="video.ogv">
>  <sourcelist><!-- content goes here --></sourcelist>
> </video>
> <script>
>  var v = document.querySelector("video");
>  var ol = v.querySelector("sourcelist");
>  v.ontimeupdate = function() {
>    ol.textContent = someInterestingText();
>  }
> </script>
>
> Now, I don't think elements can have either random markup as content
> or a defined content model with <source>, something like this:
>
> <video src="video.ogv">
>  <sourcelist>
>    <source src="subtitles.en.srt" lang="en">
>    This is an alternate subtitle.
>  </sourcelist>
> </video>
>
> Unfortunately, I believe the dynamic text has to stay completely in
> JavaScript land and with <div> elements. Or do you have a solution?

I have tried to capture the core of our discussion and what we seemed
to be able to agree on at
http://www.w3.org/WAI/PF/HTML/wiki/Media_TextAssociations .

I have changed the "sourcelist" element to "textassoc", but am still
not happy about the naming, so feel free to suggest better names
again.

Regard this as a first draft of some changes that we will eventually
want to bring to the attention of the HTML5 WG and WHATWG and ask them
to integrate into the spec, as well as ask browser vendors to
implement, so please criticise freely, so we can get this into good
shape.

Cheers,
Silvia.

Received on Wednesday, 3 February 2010 07:18:09 UTC