Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Add bool option to player to fill container for embeds. Closes #2884

Gabe Kangasdd81f8c2aa2a
diff --git a/web/components/video/OwncastPlayer/OwncastPlayer.module.scss b/web/components/video/OwncastPlayer/OwncastPlayer.module.scss
index 65e361b188..1c32f501be 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 aa6966e84e..c0b4238b10 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<OwncastPlayerProps> = ({
@@ -38,6 +39,7 @@ export const OwncastPlayer: FC<OwncastPlayerProps> = ({
initiallyMuted = false,
title,
className,
+ fill,
}) => {
const VideoSettingsService = useContext(VideoSettingsServiceContext);
const playerRef = React.useRef(null);
@@ -312,7 +314,7 @@ export const OwncastPlayer: FC<OwncastPlayerProps> = ({
/>
)}
>
- <div className={classNames(styles.container, className)} id="player">
+ <div className={classNames(styles.container, className, fill && styles.fill)} id="player">
{online && (
<div className={styles.player}>
<VideoJS options={videoJsOptions} onReady={handlePlayerReady} aria-label={title} />
diff --git a/web/pages/embed/video/index.tsx b/web/pages/embed/video/index.tsx
index 084798594b..4db717113f 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
/>
<Statusbar
online={online}