Re: Several considerations on implementing WebVTT for media players

On Fri, Aug 10, 2012 at 12:46 PM, David Singer <singer@apple.com> wrote:

> After watching examples, I am beginning to understand why some people who
> work in captions exhibit…interesting character traits. :-)
>

I did look for less crazy examples, but those were all I could find in a
few minutes.  :)

> --> STYLE
> > ::cue(:before) {
> >  color: red;
> > }
> > ::cue(:after) {
> >  color: grey;
> > }
>

(It's :past and :future, not :before and :after.)


> > Right now, you need that CSS to be interpreted by a Web browser. But I
> > agree with Carlos that we need a solution that is independent of the
> > Web and provides the styling as part of the WebVTT file:
> > https://www.w3.org/Bugs/Public/show_bug.cgi?id=15023 .
>

See also https://www.w3.org/Bugs/Public/show_bug.cgi?id=18530.


> I think this is right;  you don't need a web browser, you need (enough)
> CSS to handle this case.  Indeed, you could have before and after styles
> that change font size, and have CSS transitions that animate the changes,
> and so on.  Whether such effects are palatable I am clearly unworthy to
> judge.
>

Actually, you can't change the font size from :before and :after.  See
http://dev.w3.org/html5/webvtt/#the-'::cue'-pseudo-element.  Presumably
that's because allowing the font size to change after the cue is already
displayed would have very strange effects: the text may no longer fit in
its original place, and moving the cue and all cues after it would be very
confusing.

It would probably be possible to extend things to support this; for
example, making it possible to change the size or position of a cue in
absolute terms without affecting anything around it, or to apply CSS masks
in some way to allow smoothly transitioning the color of a cue.  I'd expect
anything like this to be a long way off, though.

-- 
Glenn Maynard

Received on Friday, 10 August 2012 18:39:17 UTC