Bug 59867 - Add support for media pseudo-classes
Summary: Add support for media pseudo-classes
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 71216
Blocks: 58345
  Show dependency treegraph
 
Reported: 2011-04-30 10:10 PDT by Dimitri Glazkov (Google)
Modified: 2023-10-21 14:33 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitri Glazkov (Google) 2011-04-30 10:10:07 PDT
See discussion on whatwg: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-April/thread.html#31315

Per WebKit contributor meeting discussion:

Ready states:
  - error
  - unknown
  - buffering

Runtime states:
  - playing

Media characteristics:
  - has-closed-captioning
  - has-audio
  - has-video
  - has-duration


Example of how to use for default UA stylesheets:
 - Browser A always wants to display a closed captioning button, but have it disabled when there are no closed captioning. Default style for video:has-closed-captioning is disabled.
 - Browser B only wants to display a closed captioning button when present. Default style for video:has-closed-captioning is display:none
Comment 1 Arun Patole 2011-10-20 01:42:00 PDT
Looks like this will be a good addition. If no one is working on this I will try to submit a patch.

Is this a final list of media pseudo classes that we have planned to add? Also one more thing, what does this "unknown" state mean?
Comment 2 Dimitri Glazkov (Google) 2011-10-20 08:50:38 PDT
Eric, do you remember what "unknown" meant? I lost track of this :)
Comment 3 Eric Carlson 2011-10-20 09:08:15 PDT
(In reply to comment #2)
> Eric, do you remember what "unknown" meant? I lost track of this :)

I don't recall exactly, maybe for an element with preload=none?
Comment 4 Dimitri Glazkov (Google) 2011-10-20 09:57:36 PDT
(In reply to comment #3)
> (In reply to comment #2)
> > Eric, do you remember what "unknown" meant? I lost track of this :)
> 
> I don't recall exactly, maybe for an element with preload=none?

Maybe. Arun, I would recommend starting with a small set of pseudo-classes and iterating on that.
Comment 5 Arun Patole 2011-10-21 05:03:42 PDT
> Maybe. Arun, I would recommend starting with a small set of pseudo-classes and iterating on that.

Ok, Thanks. I will start with small set. May be, media characteristics pseudo classes in first patch in separate bug.
Comment 6 Theresa O'Connor 2021-04-29 14:46:24 PDT
Selectors 4 has recently been updated to include the following pseudo-classes:

    :seeking
    :buffering
    :stalled
    :muted
    :volume-locked

These are in addition to these ones which already existed:

    :playing
    :paused

See the spec for the details:

    https://drafts.csswg.org/selectors-4/#resource-pseudos
Comment 7 Radar WebKit Bug Importer 2021-04-29 14:46:36 PDT
<rdar://problem/77344273>