- From: Philip Jägenstedt <philipj@opera.com>
- Date: Wed, 25 Nov 2009 21:02:19 +0100
- To: "Eric Carlson" <eric.carlson@apple.com>
- Cc: "Silvia Pfeiffer" <silviapfeiffer1@gmail.com>, "HTML Accessibility Task Force" <public-html-a11y@w3.org>
On Wed, 25 Nov 2009 18:43:39 +0100, Eric Carlson <eric.carlson@apple.com> wrote: > > On Nov 25, 2009, at 8:50 AM, Philip Jägenstedt wrote: > >> On Wed, 25 Nov 2009 17:01:27 +0100, Eric Carlson <eric.carlson@apple.com >> > wrote: >> >>> >>> On Nov 25, 2009, at 4:24 AM, Philip Jägenstedt wrote: >>> >>>> Below I focus on the HTML-specific parts: >>>> >>>> Captions/subtitles... The main problem of reusing <source> is that it >>>> doesn't work with the resource selection algorithm.[1] However, that >>>> algorithm only considers direct children of the media element, so >>>> adding a wrapping element would solve this problem and allow us to >>>> spec different rules for selecting timed-text sources. Example: >>>> >>>> <video> >>>> <source src="video.ogg" type="video/ogg"> >>>> <source src="video.mp4" type="video/mp4"> >>>> <overlay> >>>> <source src="en.srt" lang="en-US"> >>>> <source src="hans.srt" lang="zh-CN"> >>>> </overlay> >>>> </video> >>>> >>>> We could possibly allow <overlay src="english.srt"></overlay> as a >>>> shorthand when there is only one captions file, just like the video >>>> <video src=""></video> shorthand. >>>> >>>> I'm suggesting <overlay> instead of e.g. <itext> because I have some >>>> special behavior in mind: when no (usable) source is found in >>>> <overlay>, the content of the element should be displayed overlayed >>>> on top of the video element as if it were inside a CSS box of the >>>> same size as the video. This gives authors a simple way to display >>>> overlay content such as custom controls and complex "subtitles" like >>>> animated karaoke to work the same both in normal rendering and in >>>> fullscreen mode. (I don't know what kind of CSS spec magic would be >>>> needed to allow such rendering, but I don't believe overlaying the >>>> content is very difficult implementation-wise.) >>>> >>> I like the idea of an <overlay> element, but I don't understand what >>> you are proposing for when no usable source is found. Can you >>> elaborate please? >>> >> >> My thinking is that <overlay> should be the container of overlay >> content whether it is from an external subtitle file or from HTML. When >> an external subtitle file is used the element acts as if it had a >> single text node child with the content of the current text from the >> subtitle file. >> >> In the absence of an external file the content of the element is shown >> as "fallback", which can then easily be set using script. >> > Thanks, that makes sense. > > I think <overlay> should be used for internal subtitle and/or closed > caption tracks as well. Further, I think that we will want them to "just > work" so a UA should create an <overlay> element if the markup doesn't > have one and it finds that a file has internal captions/subtitles: > > <video src='my-captioned-movie'> </video> > Yes, that sounds good. One issue is how to style such an implicit <overlay>. Should one actually include an <overlay> in the markup and somehow indicate that it can/should be used to render in-band subtitles from the resource? <video src="my-captioned-movie"> <caption style="font-weight:bold" magic-attribute></caption> </video> Not awesome. Perhaps a new CSS pseudo-selector could be used? Other ideas? -- Philip Jägenstedt Opera Software
Received on Wednesday, 25 November 2009 20:01:43 UTC