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

On Tue, Apr 26, 2011 at 3:53 PM, Dimitri Glazkov <dglazkov at chromium.org>wrote:

> On Mon, Apr 25, 2011 at 7:13 PM, Robert O'Callahan <robert at ocallahan.org>
> wrote:
> > On Mon, Apr 25, 2011 at 4:04 PM, Dimitri Glazkov <dglazkov at chromium.org>
> > wrote:
> >>
> >> Based on WebKit's current media controls, let's start with these
> >> pseudo-classes:
> >>
> >> Play state:
> >> - loading
> >> - playing
> >> - streaming
> >> - error
> >
> > What's the difference between 'playing' and 'streaming'? Currently I
> don't
> > think we have anything that defines this in the spec.
>
> I am a total ignoramus of the spec, but in WebKit, streaming
> audio/video has slightly different UI (no rewind or back/forward
> buttons, etc.)
>

OK, you need to define 'playing' vs 'streaming' in the spec then. Maybe for
you 'streaming' means 'empty seekable ranges'?

Note however that in Firefox we support seeking within the buffered ranges
of streamed media, so the seekable ranges are almost never empty.

>> Capabilities:
> >> - no-audio
> >> - no-video
> >> - has-closed-captioning
> >
> > Wouldn't it be better to have "has-audio" and "has-video" instead?
> Positive
> > terms usually work better than negated terms.
>
> True, but has-audio is the default, so I'd rather not have to suddenly
> start "video + div.volume-button" only match when there's no audio. Or
> otherwise introduce both has-audio and no-audio.
>

Just use :not(:has-audio).

Rob
-- 
"Now the Bereans were of more noble character than the Thessalonians, for
they received the message with great eagerness and examined the Scriptures
every day to see if what Paul said was true." [Acts 17:11]

Received on Monday, 25 April 2011 21:57:22 UTC