Feat/BOOK-240 hero video

Approved-by: Chuma Mcphoy (We Ahead)
Approved-by: Christel Westerberg
This commit is contained in:
Erik Tiekstra
2025-12-11 08:35:27 +00:00
parent cd8b30f2ec
commit f06e466827
33 changed files with 727 additions and 122 deletions

View File

@@ -22,6 +22,7 @@ interface VideoPlayerProps extends VariantProps<typeof variants> {
captions?: Caption[]
focalPoint?: FocalPoint
autoPlay?: boolean
hasOverlay?: boolean
}
export function VideoPlayer({
@@ -31,6 +32,7 @@ export function VideoPlayer({
className,
variant = 'inline',
autoPlay,
hasOverlay,
}: VideoPlayerProps) {
const intl = useIntl()
const videoRef = useRef<HTMLVideoElement>(null)
@@ -84,7 +86,13 @@ export function VideoPlayer({
const showMuteButton = variant === 'inline' && isActivated
return (
<div className={cx(classNames, { [styles.isActivated]: isActivated })}>
<div
className={cx(
classNames,
{ [styles.isActivated]: isActivated },
{ [styles.hasOverlay]: hasOverlay }
)}
>
<video
ref={videoRef}
className={styles.video}