"use client"; import { useRef, FC, Suspense, useState } from "react"; import { Box } from "../../"; import { videoWrapper } from "./Video.styles"; import { VideoContext, VideoCoverImage, VideoFullscreen, VideoPlayer, } from "./chunks"; import "./Video.css"; const Video: FC = ({ data, imageSizes, priority = "false", onPlayerReady, onAutoPlayStarted, imageQuality, }: any) => { const videoWrapperRef = useRef(null); const [isMuted, setIsMuted] = useState(true); const [isPlaying, setIsPlaying] = useState(false); const [isFullscreen, setIsFullscreen] = useState(false); const [inlineViewer, setInlineViewer] = useState(null); const [fullViewer, setFullViewer] = useState(null); const [init, setInit] = useState(true); const { image: cover, video } = data; const handleFullscreen = (e?: any) => { if (!video?.allowFullscreen) return; setIsMuted(false); setIsFullscreen(true); setIsPlaying(true); e && e.stopPropagation(); }; return data ? ( ) : null; }; export default Video;