import { LockClosedIcon, NoSymbolIcon } from "@heroicons/react/24/outline"; import { ArrowsPointingInIcon, ArrowsPointingOutIcon, PauseIcon, PlayIcon, SpeakerWaveIcon, SpeakerXMarkIcon } from "@heroicons/react/24/solid"; import type { Src } from "@livepeer/react"; import * as Player from "@livepeer/react/player"; import { memo, type ReactNode } from "react"; import { Spinner } from "@/components/Shared/UI"; const PlayerLoading = () => (
); interface PlayerErrorProps { matcher: Player.ErrorIndicatorProps["matcher"]; icon: ReactNode; title: string; } const PlayerError = ({ matcher, icon, title }: PlayerErrorProps) => { return (
{icon} {title}
); }; interface VideoProps { src: Src[] | null; poster?: string; } const Video = ({ src, poster }: VideoProps) => { if (!src) { return null; } return ( } matcher="offline" title="Stream is offline" /> } matcher="access-control" title="Stream is private" />
LIVE
); }; export default memo(Video);