UI
Aspect Ratio API
This component is used to create a container with a fixed aspect ratio around a media provider.
Import
Properties
Previous
<-
Media Visibility
Next
Poster
->
UI
This component is used to create a container with a fixed aspect ratio around a media provider.
import '@vidstack/player/define/vds-aspect-ratio.js';
<script
type="module"
src="https://cdn.jsdelivr.net/npm/@vidstack/player@next/cdn/define/vds-aspect-ratio.js"
></script>
ratio
string
'width/height'
(eg: '16/9'
).
boolean
ratio
is a valid aspect ratio setting in the form width/height
.