Skip to content

Allow ::cue or custom properties for styling captions #720

Answered by luwes
joshchagani asked this question in Q&A
Discussion options

You must be logged in to vote

with the native <video> it should work like that.
see https://codepen.io/argyleink/pen/wvmJWeG

Firefox is I believe the most restrictive in allowing certain CSS properties via the ::cue pseudo class so some will just not work unfortunately.

hls-video allows a native <video> element as a child and that will used under the hood exposing it to the light DOM.
code will look a bit like:

<hls-video id="video" preload="metadata" controls autoplay muted crossorigin="anonymous" src="https://stream.mux.com/ICURmKjmMbTgtp2TXRJMX5nzCSdctZ1lVmvH13TVAuE.m3u8">
  <video></video>
</hls-video>

see an example here https://codepen.io/luwes/pen/LYMPNaj

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@joshchagani
Comment options

Comment options

You must be logged in to vote
3 replies
@joshchagani
Comment options

@luwes
Comment options

@joshchagani
Comment options

Answer selected by luwes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants