W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2011

[whatwg] Dynamic pseudo-classes on video/audio element to allow styling of controls

From: Philip Jägenstedt <philipj@opera.com>
Date: Sat, 23 Apr 2011 20:37:55 +0200
Message-ID: <op.vuel1hrosr6mfa@localhost.localdomain>
On Sat, 23 Apr 2011 17:02:56 +0200, Dimitri Glazkov  
<dglazkov at chromium.org> wrote:

> On Sat, Apr 23, 2011 at 2:57 AM, Philip J?genstedt <philipj at opera.com>  
> wrote:
>> On Sat, 23 Apr 2011 05:25:20 +0200, Dimitri Glazkov  
>> <dglazkov at chromium.org>
>> wrote:
>>
>>> I wonder if it makes sense to introduce a set of pseudo-classes on the
>>> video/audio elements, each reflecting a state of the media on the
>>> controls (playing/paused/error/etc.)? Then, we could use just CSS to
>>> style media controls (whether native or custom), and not have to
>>> listen to DOM events just to tweak their appearance.
>>
>> With a sufficiently large set of pseudo-classes it might be possible to  
>> do
>> *display* most of the interesting state, but how would you *change* the
>> state without using scripts? Play/pause, seek, volume, etc...
>
> This is not the goal of using pseudo-classes: they just provide you
> with a uniform way to react to changes.

In other words, one would still have to rely heavily on scripts to  
actually implement custom controls?

Also, how would one style a progress bar using pseudo-classes? How about a  
displaying elapsed/remaining time on the form MM:SS?

-- 
Philip J?genstedt
Core Developer
Opera Software
Received on Saturday, 23 April 2011 11:37:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:03 GMT