Skip to content

Pseudo elements for <video> content and controls #10507

@jakearchibald

Description

@jakearchibald

What problem are you trying to solve?

I want to apply CSS filters/adjustments to <video> content without impacting the visual appearance of controls & subtitles.

In another use-case, I want to display: none the video content, as I'm writing to it a <canvas> with post-processing, but I'd still like to overlay the browser playback controls.

What solutions exist today?

You can recreate the controls and video controls yourself, then apply CSS filters etc to the <video>.

How would you solve it?

Give <video> pseudo-elements such as:

  • video::media-content - the poster and frame content
  • video::media-controls - the controls

::cue already exists for text tracks.

::-webkit-media-controls is already a thing.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions