feature/share-libs
tsx 24 lines 490 Bytes
Raw
1 "use client";
2
3 import YouTube from "react-youtube";
4
5 export function Video({ providerId }: { providerId: string }) {
6 const opts = {
7 width: "100%",
8 height: "100%",
9 playerVars: {
10 // https://developers.google.com/youtube/player_parameters
11 autoplay: 0,
12 mute: 0,
13 controls: 0,
14 rel: 0,
15 showinfo: 0,
16 },
17 };
18
19 return (
20 <div className="mt-2 py-4 aspect-video flex-grow">
21 <YouTube videoId={providerId} opts={opts} />
22 </div>
23 );
24 }