import { Icon, Icons } from "@/components/Icon";
import { OverlayPage } from "@/components/overlays/OverlayPage";
import { Menu } from "@/components/player/internals/ContextMenu";
import { useOverlayRouter } from "@/hooks/useOverlayRouter";
import { usePlayerStore } from "@/stores/player/store";
export function DownloadView({ id }: { id: string }) {
const router = useOverlayRouter(id);
const source = usePlayerStore((s) => s.source);
if (source?.type === "hls") return null;
return (
<>
router.navigate("/")}>
Download
router.navigate("/download/pc")}>
Downloading on PC
router.navigate("/download/ios")}>
Downloading on iOS
router.navigate("/download/android")}
>
Downloading on Android
Downloads are taken directly from the provider. movie-web does not
have control over how the downloads are provided.
Download
>
);
}
export function CantDownloadView({ id }: { id: string }) {
const router = useOverlayRouter(id);
return (
<>
router.navigate("/")}>
Download
Insert explanation for why you can't download HLS here
>
);
}
function AndroidExplanationView({ id }: { id: string }) {
const router = useOverlayRouter(id);
return (
<>
router.navigate("/download")}>
Download / Android
To download on Android, tap and hold{" "}
on the video, then select save.
>
);
}
function PCExplanationView({ id }: { id: string }) {
const router = useOverlayRouter(id);
return (
<>
router.navigate("/download")}>
Download / PC
On PC, click the{" "}
three dots
{" "}
and click download.
>
);
}
function IOSExplanationView({ id }: { id: string }) {
const router = useOverlayRouter(id);
return (
<>
router.navigate("/download")}>
Download / iOS
To download on iOS, click{" "}
, then{" "}
Save to Files
{" "}
. All that's left to do now is to pick a nice and cozy folder for
your video!
>
);
}
export function DownloadRoutes({ id }: { id: string }) {
return (
<>
>
);
}