vime-js / vime

Customizable, extensible, accessible and framework agnostic media player. Modern alternative to Video.js and Plyr. Supports HTML5, HLS, Dash, YouTube, Vimeo, Dailymotion...
https://vimejs.com
MIT License
2.78k stars 152 forks source link

Need help with styling components #265

Closed DanaIliescu closed 3 years ago

DanaIliescu commented 3 years ago

Hi and thank you for this great library. I have a very simple use case where I need to play some local audio files and I only need to show the play and mute buttons. This I have done with the following code:

import { Player, Audio, DefaultUi, Controls, MuteControl, PlaybackControl } from '@vime/react';

    <Player>
        <Audio>
            <source
                data-src={audio.src}
                type="audio/mp3"
            />
        </Audio>

        <DefaultUi noControls>
            <Controls>
                <PlaybackControl hideTooltip />
                <MuteControl hideTooltip />
            </Controls>
        </DefaultUi>
    </Player>

My site has a linear scaling design with em, but all styles for the Player are in px. How can I change the width and height of elements to use em instead of px? I could not figure it out by reading the documentation...

Thanks a lot!!

DanaIliescu commented 3 years ago

Closed. Ended up using another library

Nisthar commented 2 years ago

@DanaIliescu what library did you use?