From 7ec7e1704c5ff1f8b48339f12428d5f03368563d Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Wed, 5 Apr 2023 20:05:22 -0700 Subject: [PATCH] Add bool option to player to fill container for embeds. Closes #2884 --- web/components/video/OwncastPlayer/OwncastPlayer.module.scss | 4 ++++ web/components/video/OwncastPlayer/OwncastPlayer.tsx | 4 +++- web/pages/embed/video/index.tsx | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/web/components/video/OwncastPlayer/OwncastPlayer.module.scss b/web/components/video/OwncastPlayer/OwncastPlayer.module.scss index 65e361b18..1c32f501b 100644 --- a/web/components/video/OwncastPlayer/OwncastPlayer.module.scss +++ b/web/components/video/OwncastPlayer/OwncastPlayer.module.scss @@ -19,3 +19,7 @@ grid-row: 1; } } + +.fill { + max-height: unset; +} diff --git a/web/components/video/OwncastPlayer/OwncastPlayer.tsx b/web/components/video/OwncastPlayer/OwncastPlayer.tsx index aa6966e84..c0b4238b1 100644 --- a/web/components/video/OwncastPlayer/OwncastPlayer.tsx +++ b/web/components/video/OwncastPlayer/OwncastPlayer.tsx @@ -30,6 +30,7 @@ export type OwncastPlayerProps = { initiallyMuted?: boolean; title: string; className?: string; + fill?: boolean; }; export const OwncastPlayer: FC = ({ @@ -38,6 +39,7 @@ export const OwncastPlayer: FC = ({ initiallyMuted = false, title, className, + fill, }) => { const VideoSettingsService = useContext(VideoSettingsServiceContext); const playerRef = React.useRef(null); @@ -312,7 +314,7 @@ export const OwncastPlayer: FC = ({ /> )} > -
+
{online && (
diff --git a/web/pages/embed/video/index.tsx b/web/pages/embed/video/index.tsx index 084798594..4db717113 100644 --- a/web/pages/embed/video/index.tsx +++ b/web/pages/embed/video/index.tsx @@ -57,6 +57,7 @@ export default function VideoEmbed() { online={online} initiallyMuted={initiallyMuted} title={streamTitle || name} + fill />