-
Notifications
You must be signed in to change notification settings - Fork 719
[selectors-4] additional resource state pseudo-classes for media elements #3821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Looks good to me Shameless plug: http://fremycompany.com/TR/2012/ED-css-content-state/#interactive |
All these sound good. For the volume one, is the issue that the UA can let the user dictate the volume, ignoring the |
@tabatkins, essentially yes. As a concrete example, some sites currently try to detect whether changing volume is supported by setting |
Cool, sounds good. Been trying to think of decent names for the pseudo, tho, and am coming up blank. ^_^ |
Yeah, same. Would it help if I broke that one out into a separate issue? |
Eh, sure. Might as well. |
For starting the bikeshed debate on that separate issue (please copy over once there's somewhere to copy to):
|
Okay, I moved the volume case over to its own issue, #3933. The three remaining cases in this issue should be really straightforward. |
The CSS Working Group just discussed
The full IRC log of that discussion |
Please also add a :buffering (or :waiting) pseudo-class distinct from :stalled, at the same time as adding :stalled. Use-case: showing loading/buffering spinner, often with a %, e.g. on Netflix. I’d like to see :buffering defined similar to :stalled https://html.spec.whatwg.org/multipage/media.html#event-media-stalled, however with the key difference that data is forthcoming. Similar to how the waiting event is defined: https://html.spec.whatwg.org/multipage/media.html#event-media-waiting Alternatively I'd be ok with a :waiting pseudo-class that maps to the waiting event/definition (might be simpler for the platform / web-developers if we "just" do/keep a direct mapping of the pseudo-class to an existing HTML event name). I do think it is important to add :buffering (or :waiting) at the same time as adding :stalled, in order to avoid having :stalled be errantly overloaded by implementers and/or web developers to handle the buffering use-case. (Originally published at: https://tantek.com/2019/155/t2/) |
Uh oh!
There was an error while loading. Please reload this page.
In §11 Resource State Pseudos we currently have the
:playing
and:paused
pseudo-classes, which collectively address the use case of a custom "play/pause" media control which should appear as a play button or as a pause button depending on the current play state of the associated media element. A bunch of us (@beccahughes @mounirlamouri @padenot @jyavenard @eric-carlson @jernoble et al.) would like to address several related use cases with additional resource state pseudo-classes::muted
pseudo-class.:stalled
pseudo-class.:seeking
pseudo-class.Currently, authors of custom media controls have to do some combination of UA-sniffing and other logic from script in order to handle these cases. Ideally, the appearance of such controls would be expressible in CSS, just as play state currently is.
The text was updated successfully, but these errors were encountered: