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.75k stars 154 forks source link

Player goes over 100% of page #369

Open anKordii opened 1 year ago

anKordii commented 1 year ago

Hi,

I want to get player on whole page but when I do that with for example ratios from bootstrap, player goes over 100% of page and scroll bar appear.

I'm not the best at css and I can't find solution to it.

Framework: Nextjs

Code

.ratio-16x9 {
    --bs-aspect-ratio: calc(9 / 16 * 100%);
}
.ratio {
    position: relative;
    width: 100%;
}
<div className="ratio ratio-16x9">
      <Player playsinline onVmPlaybackReady={onPlaybackReady}>
        <Video poster={poster}>
          <source
            data-src={video}
            type="video/mp4"
          />
        </Video>

        <DefaultUi>

        </DefaultUi>
      </Player>
</div>

Screenshot

That green thing is the scroll bar

image