:playing
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
The :playing
CSS pseudo-class selector represents the playback state of an element that is playable, such as <audio>
or <video>
, when that element is "playing".
An element is considered to be playing if it is currently playing the media resource, or if it has temporarily stopped for reasons other than user intent (such as :buffering
or :stalled
).
Syntax
css
:playing {
/* ... */
}
Examples
CSS
css
:playing {
border: 5px solid green;
}
Specifications
Specification |
---|
Selectors Level 4 # selectordef-playing |
HTML # selector-playing |
Browser compatibility
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
:playing |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.