Skip to content
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

Bug: No way to style <video> element inside <mux-video> #125

Closed
balexand opened this issue Mar 8, 2022 · 5 comments · Fixed by #199
Closed

Bug: No way to style <video> element inside <mux-video> #125

balexand opened this issue Mar 8, 2022 · 5 comments · Fixed by #199
Labels
bug Something isn't working

Comments

@balexand
Copy link

balexand commented Mar 8, 2022

Which Mux Elements/Packages has a bug?

  • mux-video

Which browser(s) are you using?

  • Chrome

Which operating system(s) are you using?

Mac

How are you using Mux Elements?

<script async src="https://unpkg.com/@mux-elements/mux-video"></script>.

Describe the bug

I want to style the<video> element inside of the <mux-video> element. In particular, I'd like to add object-fit: cover.

Pasted_Image_3_8_22__2_30_PM

The current behavior

As far as I can tell, there is no way to style this element.

The expected behavior

I want to be able to style it. A simple solution would be to put a part="video" attribute on the <video> element. That way one could style it as described in https://developer.mozilla.org/en-US/docs/Web/CSS/::part. I've tested this out by adding the part attribute in Chrome Devtools and it works.

image

@balexand balexand added bug Something isn't working Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug labels Mar 8, 2022
@luwes
Copy link
Contributor

luwes commented Apr 15, 2022

thanks for the feedback @balexand! this seems like a good solution, we'll discuss and come back to you.

Related to muxinc/media-chrome#206

@luwes luwes removed the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Apr 15, 2022
gkatsev added a commit to gkatsev/elements that referenced this issue Apr 25, 2022
gkatsev added a commit that referenced this issue Apr 26, 2022
@ProofWoW
Copy link

Hello,
How i can setup object-fit: cover for the video element, in mux-player-react?
Thank you

@mikker
Copy link
Contributor

mikker commented Sep 13, 2022

I'm new to CSS Shadow Parts but I think we'll need exportparts too if we want to style when nested inside a mux-player element?

@mikker
Copy link
Contributor

mikker commented Sep 13, 2022

#384

@gkatsev
Copy link
Contributor

gkatsev commented Sep 13, 2022

It should be available in mux-video. However, we have some concerns about exposing it from mux-player. Started discussion to that point in #380.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants