Use fork of downloader lib

This commit is contained in:
Zoe Roux 2024-07-01 07:37:00 +00:00
parent 2ebf206caa
commit f46837e997
No known key found for this signature in database
7 changed files with 18 additions and 9 deletions

View File

@ -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",

View File

@ -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",

View File

@ -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"

View File

@ -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"
},

View File

@ -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,

View File

@ -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={() => {

View File

@ -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