import { useRef } from "react"; import { CastingInternal } from "@/video/components/internal/CastingInternal"; import { WrapperRegisterInternal } from "@/video/components/internal/WrapperRegisterInternal"; import { VideoErrorBoundary } from "@/video/components/parts/VideoErrorBoundary"; import { useInterface } from "@/video/state/logic/interface"; import { useMeta } from "@/video/state/logic/meta"; import { MetaAction } from "./actions/MetaAction"; import ThumbnailGeneratorInternal from "./internal/ThumbnailGeneratorInternal"; import { VideoElementInternal } from "./internal/VideoElementInternal"; import { VideoPlayerContextProvider, useVideoPlayerDescriptor, } from "../state/hooks"; export interface VideoPlayerBaseProps { children?: | React.ReactNode | ((data: { isFullscreen: boolean }) => React.ReactNode); autoPlay?: boolean; includeSafeArea?: boolean; onGoBack?: () => void; } function VideoPlayerBaseWithState(props: VideoPlayerBaseProps) { const ref = useRef(null); const descriptor = useVideoPlayerDescriptor(); const videoInterface = useInterface(descriptor); const media = useMeta(descriptor); const children = typeof props.children === "function" ? props.children({ isFullscreen: videoInterface.isFullscreen, }) : props.children; // TODO move error boundary to only decorated, shouldn't have styling return (
{children}
); } export function VideoPlayerBase(props: VideoPlayerBaseProps) { return ( ); }