Here is a responsive option
Install react-player
by running npm install react-player
In intro.mdx
---
slug: /
sidebar_position: 1
---
import ReactPlayer from "react-player"
<div className="video__wrapper">
<ReactPlayer className="video__player" controls height="100%" url="https://storage.googleapis.com/files.school-app.bujus.de/school-instructions-v2-compressed.mp4" width="100%" />
</div>
In custom.css
.video__wrapper {
position: relative;
padding-bottom: 56.25%; /* Video aspect ratio: 100 / (16 / 9) */
}
.video__player {
position: absolute;
top: 0;
left: 0;
}
You may have to adjust the padding-bottom value. The formula to calculate it is besides the value.
When you want a break line below the video add {" "}
below the </div>
.
You may want to add a thumbnail image with something like the following code:
config={{
file: {
attributes: {
poster:
"https://thumbnail.jpg",
},
},
}}