mirror of
https://github.com/owncast/owncast.git
synced 2024-11-22 21:03:19 +03:00
Add bool option to player to fill container for embeds. Closes #2884
This commit is contained in:
parent
f724beecae
commit
7ec7e1704c
3 changed files with 8 additions and 1 deletions
|
@ -19,3 +19,7 @@
|
||||||
grid-row: 1;
|
grid-row: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fill {
|
||||||
|
max-height: unset;
|
||||||
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@ export type OwncastPlayerProps = {
|
||||||
initiallyMuted?: boolean;
|
initiallyMuted?: boolean;
|
||||||
title: string;
|
title: string;
|
||||||
className?: string;
|
className?: string;
|
||||||
|
fill?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const OwncastPlayer: FC<OwncastPlayerProps> = ({
|
export const OwncastPlayer: FC<OwncastPlayerProps> = ({
|
||||||
|
@ -38,6 +39,7 @@ export const OwncastPlayer: FC<OwncastPlayerProps> = ({
|
||||||
initiallyMuted = false,
|
initiallyMuted = false,
|
||||||
title,
|
title,
|
||||||
className,
|
className,
|
||||||
|
fill,
|
||||||
}) => {
|
}) => {
|
||||||
const VideoSettingsService = useContext(VideoSettingsServiceContext);
|
const VideoSettingsService = useContext(VideoSettingsServiceContext);
|
||||||
const playerRef = React.useRef(null);
|
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 && (
|
{online && (
|
||||||
<div className={styles.player}>
|
<div className={styles.player}>
|
||||||
<VideoJS options={videoJsOptions} onReady={handlePlayerReady} aria-label={title} />
|
<VideoJS options={videoJsOptions} onReady={handlePlayerReady} aria-label={title} />
|
||||||
|
|
|
@ -57,6 +57,7 @@ export default function VideoEmbed() {
|
||||||
online={online}
|
online={online}
|
||||||
initiallyMuted={initiallyMuted}
|
initiallyMuted={initiallyMuted}
|
||||||
title={streamTitle || name}
|
title={streamTitle || name}
|
||||||
|
fill
|
||||||
/>
|
/>
|
||||||
<Statusbar
|
<Statusbar
|
||||||
online={online}
|
online={online}
|
||||||
|
|
Loading…
Reference in a new issue