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

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 UTC