mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 18:13:25 +00:00
feat: mp4 downloads
This commit is contained in:
@@ -5,6 +5,7 @@ import ContextMenu from "react-native-context-menu-view";
|
||||
import { useRouter } from "expo-router";
|
||||
import { Image, Text, View } from "tamagui";
|
||||
|
||||
// import { useDownloadManager } from "~/hooks/DownloadManagerContext";
|
||||
import { usePlayerStore } from "~/stores/player/store";
|
||||
|
||||
export interface ItemData {
|
||||
@@ -18,6 +19,8 @@ export interface ItemData {
|
||||
export default function Item({ data }: { data: ItemData }) {
|
||||
const resetVideo = usePlayerStore((state) => state.resetVideo);
|
||||
const router = useRouter();
|
||||
// const { startDownload } = useDownloadManager();
|
||||
|
||||
const { title, type, year, posterUrl } = data;
|
||||
|
||||
const handlePress = () => {
|
||||
@@ -35,9 +38,13 @@ export default function Item({ data }: { data: ItemData }) {
|
||||
];
|
||||
|
||||
const onContextMenuPress = (
|
||||
_e: NativeSyntheticEvent<ContextMenuOnPressNativeEvent>,
|
||||
e: NativeSyntheticEvent<ContextMenuOnPressNativeEvent>,
|
||||
) => {
|
||||
// do stuff
|
||||
console.log(e.nativeEvent.name);
|
||||
// startDownload(
|
||||
// "https://samplelib.com/lib/preview/mp4/sample-5s.mp4",
|
||||
// "mp4",
|
||||
// ).catch(console.error);
|
||||
};
|
||||
|
||||
return (
|
||||
|
Reference in New Issue
Block a user