diff --git a/packages/core/package.json b/packages/core/package.json index 070dd6424..d3434953e 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -56,7 +56,6 @@ "date-fns": "^4.1.0", "dateformat": "^5.0.3", "expo-av": "~16.0.8", - "expo-file-system": "~19.0.21", "expo-image": "~3.0.11", "lodash.isequal": "^4.5.0", "lodash.isnumber": "^3.0.3", diff --git a/packages/core/src/components/MediaPlayer/MediaPlayerCommon.ts b/packages/core/src/components/MediaPlayer/MediaPlayerCommon.ts index 05cd95d05..7aba6f632 100644 --- a/packages/core/src/components/MediaPlayer/MediaPlayerCommon.ts +++ b/packages/core/src/components/MediaPlayer/MediaPlayerCommon.ts @@ -1,5 +1,4 @@ import { AVPlaybackSource, AVPlaybackStatus } from "expo-av"; -import { File, Paths } from "expo-file-system"; import { v4 as uuid } from "uuid"; import { Platform } from "react-native"; import React from "react"; @@ -68,6 +67,8 @@ export async function normalizeBase64Source( const uri: string | undefined = (source as any)?.uri; if (Platform.OS === "ios" && uri && !uri.match(URL_REGEX)) { + const { File, Paths } = await import("expo-file-system"); + const defaultMimeType = type === "audio" ? "wav" : "mp4"; const mimeType = uri.startsWith(`data:${type}/`) ? uri.substring(`data:${type}/`.length, uri.indexOf(";")) //Ex: extract 'mp4' from 'data:video/mp4;base64,....'