Skip to content

Commit 19265e9

Browse files
committed
import as type
1 parent eb97ef6 commit 19265e9

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

packages/core/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@
8686
"uuid": "^11.0.3"
8787
},
8888
"peerDependencies": {
89-
"react-native-avoid-softinput": "^4.0.1",
90-
"expo-file-system": "~19.0.21"
89+
"react-native-avoid-softinput": "^4.0.1"
9190
},
9291
"peerDependenciesMeta": {
9392
"react-native-avoid-softinput": {

packages/core/src/components/MediaPlayer/MediaPlayerCommon.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { AVPlaybackSource, AVPlaybackStatus } from "expo-av";
2-
import { File, Paths } from "expo-file-system";
2+
import type { File as FileType, Paths as PathsType } from "expo-file-system";
33
import { v4 as uuid } from "uuid";
44
import { Platform } from "react-native";
55
import React from "react";
@@ -65,6 +65,10 @@ export async function normalizeBase64Source(
6565
source: AVPlaybackSource,
6666
type: "audio" | "video"
6767
): Promise<AVPlaybackSource> {
68+
const expoFs = require("expo-file-system");
69+
const File: typeof FileType = expoFs.File;
70+
const Paths: typeof PathsType = expoFs.Paths;
71+
6872
const uri: string | undefined = (source as any)?.uri;
6973

7074
if (Platform.OS === "ios" && uri && !uri.match(URL_REGEX)) {

0 commit comments

Comments
 (0)