I’m attempting to generate a thumbnail from an area video on iOS 18.5 (iPhone 11 Professional) utilizing expo-media-library and expo-video-thumbnails.
Right here’s the related code:
// Get asset data
const assetInfo = await MediaLibrary.getAssetInfoAsync(asset.id);
let videoUri = assetInfo.localUri || '';
if (!videoUri) {
return null;
}
const thumbnail = await VideoThumbnails.getThumbnailAsync(videoUri, {
time: 0,
high quality: 0.6,
});
I get the next log:
Media library permission standing: true
assetInfo============ { ... , localUri: "file:///var/cell/Media/DCIM/100APPLE/IMG_0131.MOV#..." }
Direct thumbnail technology failed, attempting export technique: The file couldn’t be opened since you don’t have permission to view it.
Media library permission is already granted (true).
The localUri appears appropriate.
If I preview the video within the app first, then strive producing the thumbnail, it really works — however not earlier than.
I discovered that if I attempted to play my native movies on my APP, it reported “The file couldn’t be opened since you don’t have permission to view it.”, too.
Has anybody skilled this on iOS 18+? Is there a identified workaround for accessing native movies immediately for thumbnail technology?
Thanks prematurely!
discover a method to resolve the issue with out having to make a backup.