diff --git a/front/apps/mobile/package.json b/front/apps/mobile/package.json index dc3cb697..bf856097 100644 --- a/front/apps/mobile/package.json +++ b/front/apps/mobile/package.json @@ -18,7 +18,7 @@ "@formatjs/intl-displaynames": "^6.6.8", "@formatjs/intl-locale": "^4.0.0", "@gorhom/portal": "^1.0.14", - "@kesha-antonov/react-native-background-downloader": "^3.1.3", + "@kesha-antonov/react-native-background-downloader": "HyopeR/react-native-background-downloader", "@kyoo/ui": "workspace:^", "@material-symbols/svg-400": "^0.18.0", "@react-native-community/netinfo": "11.3.1", diff --git a/front/apps/web/package.json b/front/apps/web/package.json index 2442f40e..f55854a4 100644 --- a/front/apps/web/package.json +++ b/front/apps/web/package.json @@ -2,7 +2,9 @@ "name": "web", "version": "0.1.0", "private": true, - "sideEffects": ["./src/polyfill.ts"], + "sideEffects": [ + "./src/polyfill.ts" + ], "scripts": { "dev": "next dev", "build": "next build", diff --git a/front/package.json b/front/package.json index 5c6a6185..82fc5eb0 100644 --- a/front/package.json +++ b/front/package.json @@ -15,7 +15,10 @@ "format": "biome format .", "format:fix": "biome format . --write" }, - "workspaces": ["apps/*", "packages/*"], + "workspaces": [ + "apps/*", + "packages/*" + ], "devDependencies": { "@biomejs/biome": "1.7.3", "typescript": "5.4.5" diff --git a/front/packages/ui/package.json b/front/packages/ui/package.json index 50686bed..1630a8e3 100644 --- a/front/packages/ui/package.json +++ b/front/packages/ui/package.json @@ -35,7 +35,7 @@ "yoshiki": "*" }, "optionalDependencies": { - "@kesha-antonov/react-native-background-downloader": "^3.1.3", + "@kesha-antonov/react-native-background-downloader": "HyopeR/react-native-background-downloader", "expo-file-system": "^17.0.1", "expo-router": "^3.5.14" }, diff --git a/front/packages/ui/src/downloads/state.tsx b/front/packages/ui/src/downloads/state.tsx index c1d8b503..53b98dfc 100644 --- a/front/packages/ui/src/downloads/state.tsx +++ b/front/packages/ui/src/downloads/state.tsx @@ -186,6 +186,9 @@ const download = ( const path = `${RNBackgroundDownloader.directories.documents}/${slug}-${id}.${extension}`; const task = RNBackgroundDownloader.download({ id: id, + metadata: { + + }, // TODO: support variant qualities url: `${account.apiUrl}/${type}/${slug}/direct`, destination: path, diff --git a/front/packages/ui/src/player/video.web.tsx b/front/packages/ui/src/player/video.web.tsx index b7f744d9..f04330ce 100644 --- a/front/packages/ui/src/player/video.web.tsx +++ b/front/packages/ui/src/player/video.web.tsx @@ -218,6 +218,7 @@ const Video = forwardRef<{ seek: (value: number) => void }, VideoProps>(function autoPlay={!paused} controls={false} playsInline + disableDisconnectError onCanPlay={() => onBuffer?.call(null, { isBuffering: false })} onWaiting={() => onBuffer?.call(null, { isBuffering: true })} onDurationChange={() => { diff --git a/front/yarn.lock b/front/yarn.lock index 57fef607..0b3e085c 100644 --- a/front/yarn.lock +++ b/front/yarn.lock @@ -3323,12 +3323,12 @@ __metadata: languageName: node linkType: hard -"@kesha-antonov/react-native-background-downloader@npm:^3.1.3": +"@kesha-antonov/react-native-background-downloader@HyopeR/react-native-background-downloader": version: 3.1.3 - resolution: "@kesha-antonov/react-native-background-downloader@npm:3.1.3" + resolution: "@kesha-antonov/react-native-background-downloader@https://github.com/HyopeR/react-native-background-downloader.git#commit=df9ceb15e0a157b9baeef04fea2dfb1afed7ac99" peerDependencies: react-native: ">=0.57.0" - checksum: 930c6384a3ea701c714d547b955f7e487c9c820073be48ebd96b4018a542ce1adc74475e2bbbf8b26b0b6773b9e71b52018c0f7e190d9bd13705096399a72e35 + checksum: 5be267225ed375fcd26f8eda8bd1ca5f83fa9a511e565540a2e3439399b43c694cf82d5ab4aca58167798d08522b2fa83bed895c75cc7e23af3cd92e8d987f81 languageName: node linkType: hard @@ -3415,7 +3415,7 @@ __metadata: resolution: "@kyoo/ui@workspace:packages/ui" dependencies: "@gorhom/portal": ^1.0.14 - "@kesha-antonov/react-native-background-downloader": ^3.1.3 + "@kesha-antonov/react-native-background-downloader": HyopeR/react-native-background-downloader "@kyoo/models": "workspace:^" "@kyoo/primitives": "workspace:^" "@shopify/flash-list": ^1.6.4 @@ -10513,7 +10513,7 @@ __metadata: "@formatjs/intl-displaynames": ^6.6.8 "@formatjs/intl-locale": ^4.0.0 "@gorhom/portal": ^1.0.14 - "@kesha-antonov/react-native-background-downloader": ^3.1.3 + "@kesha-antonov/react-native-background-downloader": HyopeR/react-native-background-downloader "@kyoo/ui": "workspace:^" "@material-symbols/svg-400": ^0.18.0 "@react-native-community/netinfo": 11.3.1