New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ios] No permission to access certain videos from MediaLibrary #8769
Comments
Hi @awinograd, thanks for the issue report! As always, it's well documented 馃憤 I think this is similar to issue #8541, right? To fetch the thumbnail of a remote video, e.g. iCloud, we need to download the asset first. Unfortunately, such an API to do that doesn't exist at the moment. But, we are definitely open to any PR making this possible. As for the "You don't have permission", you could try making this accessible for Expo using the Hope it helps! |
@byCedric the issue may be well documented but my "github search foo" could use some improvement 馃槅 Yep it looks like the linked issue is the same root cause. Happy to close this out. I'll add some follow-up thoughts to that issue too. |
Haha, no worries, you complimented the original issue with this 馃槃 |
The same problem occurs when i call MediaLibrary.getAssetInfoAsync to get the LocalUri of the Asset, which triggers it's download at the same time. To then render a Video Component with the given localUri. In my case the thumbnails are generated but some of the videos that are in iCloud wont be played. The following Error occurs: {"error":{"localizedDescription":"The file couldn鈥檛 be opened because you don鈥檛 have permission to view it.","domain":"NSCocoaErrorDomain","localizedFailureReason":"You don鈥檛 have permission.","localizedRecoverySuggestion":"To view or change permissions, select the item in the Finder and choose File > Get Info.","code":257},"target":2295} But not for every asset! Same as mentioned above. Only if the asset relates to following path: "localUri": "file:///var/mobile/Media/PhotoData/Metadata/DCIM/121APPLE/IMG_1353.medium.MP4", This is working: "file:///var/mobile/Media/DCIM/100APPLE/IMG_0007.MOV" So how is the proper way to handle that? Without copying the same asset to the library? |
馃悰 Bug Report
Summary of Issue (just a few sentences)
I'm using
MediaLibrary.getAssetsAsync
andMediaLibrary.getAssetInfoAsync
to display a custom rendered media library picker. My assets render fine except for certain video assets (that I believe are backed up to iCloud rather than immediately available on the device).If I try to call
VideoThumbnails.getThumbnailAsync(asset.localUri)
I get a "You don't have permission" error if the local uri is in/var/mobile/Media/PhotoData
not working:
file:///var/mobile/Media/PhotoData/Metadata/DCIM/100APPLE/IMG_0005.medium.MP4
working:
file:///var/mobile/Media/DCIM/100APPLE/IMG_0007.MOV
Environment - output of
expo diagnostics
& the platform(s) you're targetingReproducible Demo
https://snack.expo.io/@ouihealth/f2e403
Steps to Reproduce
Expected Behavior vs Actual Behavior
All localUris should be able to generate thumbnails without permission errors.
Notes
The text was updated successfully, but these errors were encountered: