import { MWStreamQuality, MWStreamType } from "@/backend/helpers/streams"; import { DetailedMeta } from "@/backend/metadata/getmeta"; import { MWMediaType } from "@/backend/metadata/types"; import { Button } from "@/components/Button"; import { Navigation } from "@/components/layout/Navigation"; import { ThinContainer } from "@/components/layout/ThinContainer"; import { MetaController } from "@/video/components/controllers/MetaController"; import { SourceController } from "@/video/components/controllers/SourceController"; import { VideoPlayer } from "@/video/components/VideoPlayer"; import { useCallback, useState } from "react"; import { Helmet } from "react-helmet"; interface VideoData { streamUrl: string; } const testData: VideoData = { streamUrl: "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4", }; const testMeta: DetailedMeta = { imdbId: "", tmdbId: "", meta: { id: "hello-world", title: "Big Buck Bunny", type: MWMediaType.MOVIE, seasons: undefined, year: "2000", }, }; export function VideoTesterView() { const [video, setVideo] = useState(null); const [url, setUrl] = useState(""); const playVideo = useCallback((streamUrl: string) => { setVideo({ streamUrl, }); }, []); if (video) { return (
setVideo(null)}>
); } return (
setUrl(e.target.value)} />
); }