Lazy-load mediabunny on web (#11094)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Samuel Newman
2026-07-08 16:21:16 +03:00
committed by GitHub
parent ea3d6827c7
commit b41624edea
3 changed files with 39 additions and 12 deletions
+2 -1
View File
@@ -1,6 +1,6 @@
import {type ImagePickerAsset} from 'expo-image-picker'
import {ALL_FORMATS, BlobSource, Input} from 'mediabunny'
import {loadMediaBunny} from '#/lib/media/video/mediabunny'
import {logger} from '#/logger'
export function hasWebCodecs(): boolean {
@@ -55,6 +55,7 @@ async function getMetadataWithWebCodecs(
file: File,
blobUrl: string,
): Promise<ImagePickerAsset> {
const {ALL_FORMATS, BlobSource, Input} = await loadMediaBunny()
const input = new Input({
source: new BlobSource(file),
formats: ALL_FORMATS,