diff --git a/src/components/YouTube.tsx b/src/components/YouTube.tsx index 6649679ee0b..c4fa72925a3 100644 --- a/src/components/YouTube.tsx +++ b/src/components/YouTube.tsx @@ -14,6 +14,7 @@ import "react-lite-youtube-embed/dist/LiteYouTubeEmbed.css" * @param {start} Start time of the video in seconds * URLs come in format: https://www.youtube.com/watch?v=&t= or: https://www.youtube.com/embed/?start= * e.g., For https://www.youtube.com/watch?v=H-O3r2YMWJ4&t=123 the `start` is 123 (which means 123 seconds) + * @param {portrait} boolean used for YouTube Shorts using portrait orientation (default = false) * @returns Embedded YouTube video component */ @@ -22,22 +23,30 @@ type YouTubeProps = { start?: string title?: string className?: string + portrait?: boolean } & React.ComponentProps const YouTube = ({ id, start = "0", title = "YouTube", + portrait, className, ...props }: YouTubeProps) => { const params = new URLSearchParams() ;+start > 0 && params.set("start", start) return ( -
+