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

This commit is contained in:
Gabe Kangas 2023-04-05 20:05:22 -07:00
parent f724beecae
commit 7ec7e1704c
No known key found for this signature in database
GPG key ID: 4345B2060657F330
3 changed files with 8 additions and 1 deletions

View file

@ -19,3 +19,7 @@
grid-row: 1;
}
}
.fill {
max-height: unset;
}

View file

@ -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} />

View file

@ -57,6 +57,7 @@ export default function VideoEmbed() {
online={online}
initiallyMuted={initiallyMuted}
title={streamTitle || name}
fill
/>
<Statusbar
online={online}