W3C home > Mailing lists > Public > www-style@w3.org > July 2012

Re: a :time pseudo-class for media elements (and examples on how it would be useful and generic)

From: Julien Dorra <juliendorra@juliendorra.com>
Date: Tue, 31 Jul 2012 14:25:36 +0200
Message-ID: <CALfAofU_NhyiVno9eNenZVaQFzXPMm-Ehogoxz_h+RbLx15E6A@mail.gmail.com>
To: François REMY <fremycompany_pub@yahoo.fr>
Cc: www-style@w3.org
Hi François, thanks for the quick feedback!

I don’t know if other use-cases could benefit from this (maybe there are)
> but, at least, solving the subtitle (video captionning) problem is probably
> better done using the existing <track /> element. See
> http://blogs.msdn.com/b/ie/archive/2011/10/12/html5-video-captioning.aspxfor more info.
>

Yes, I know of the TRACK element, it's focused on textual subtitles. (AFAIK
there is many things you cannot do with track : hyperlinked subtitles,
adding images, etc. Subtitles in pure HTML have usually a more interactive
purpose. Track/WebVTT goal is to bring the old sub text file technique into
the web era.)


In any case, even with Track, there is no way to style a TRACK element in
relation with the time of the media.
a :time pseudo-class could be applied on a sibling track element too, so it
changes style in relation with the time:

video:24200~track {
color: black;
background-color: yellow
}



> Another idea to solve this broader kind of problem more efficiently than
> using a pseudo-class would be to be able to specify a timesource for
> animations that’s different from the computer clock.
>
> .video-related {
>     animation-time-source: url(#videoID);
> }
>
>
Thanks, that's a great idea to augment the usefulness of animations! Would
probably help the Popcornjs team a lot…


One thing that :time would have for it, is that it would allow simple
styling like that:

video:24200~p {
color: black;
background-color: yellow
}

I'm not sure that kind of styling needs a fully defined animation?

Julien
Received on Tuesday, 31 July 2012 12:26:49 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:57 GMT