- From: Philip Jägenstedt <philipj@opera.com>
- Date: Fri, 10 Aug 2012 11:06:42 +0200
- To: public-texttracks@w3.org
On Thu, 09 Aug 2012 10:27:11 +0200, Julien Villetorte <j.villetorte@gmail.com> wrote: > 2012/8/8 Philip Jägenstedt<philipj@opera.com <mailto:philipj@opera.com>> > > I found a couple of (maybe known) issues related to WebVTT > classes and > settings. > Taking this video as an > example:http://www.delphiki.com/html5/playr/ > <http://www.delphiki.com/html5/playr/> > The first cue (see webvtt file: > http://www.delphiki.com/html5/playr/examples/dw_trailer_low.vtt > <http://www.delphiki.com/html5/playr/examples/dw_trailer_low.vtt>) > does not > render properly, multiples classes seems to be the problem. > > > I investigated a bit and it turns out that the problem is > position:0%. Per spec, that means that the maximum size of the cue > should be 0, which is really strange. I filed a > bug:https://www.w3.org/Bugs/Public/show_bug.cgi?id=18501 > <https://www.w3.org/Bugs/Public/show_bug.cgi?id=18501> > > If you try position:0% line:0 you'll see where the rest of the text > ended up -- one word per line! The reason that the cue wasn't moved > up into the viewport is because the cue box has width 0 and it's not > really clear if that should be considered intersecting the viewport > or not :/ > > > In this case, I may have misinterpreted the spec about position. > I thought this was the way it should behave: > http://leanbackplayer.com/other/webvtt.html#cue-settings-textposition > I think I get the general idea now. > Anyway this isn't the clearest part of the spec. Actually, I also didn't really understand how position was supposed to work until I investigated your problem. I hope we can just change the spec on this point, so feedback from authors (you) and other implementors on that bug would be appreciated. > ::cue:past & ::cue:future pseudo-classes don't seem to be > supported. > > > Those have been implemented and tested, can you give an example of > something that doesn't work? > > > I haven't been able to make them work. > I may not have done it the right way, see the last 2 selectors in this > file: http://www.delphiki.com/html5/playr/style.css There are a few problems here. First, the syntax should be ::cue(:future){ opacity:0; } ::cue(:past){ opacity:1; color:yellow; } Second, opacity isn't on the white list of CSS properties allowed for ::cue, so I've filed <https://www.w3.org/Bugs/Public/show_bug.cgi?id=18519> to allow that. Finally, :past and :future don't work if you just have text between the timestamps, see <https://www.w3.org/Bugs/Public/show_bug.cgi?id=16875>. This is a really bad bug, but a workaround is wrapping text in <c>... -- Philip Jägenstedt Core Developer Opera Software
Received on Friday, 10 August 2012 09:07:01 UTC