-
Notifications
You must be signed in to change notification settings - Fork 319
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug report] cannot access video format in iOS 18 Live Photo #1196
Comments
I think it should be different issue. |
We don't have iOS 18 devices around, unfortunately. |
How about video assets? Do they played well on iOS 18? |
Video Assets can play without issue. |
The video url of live photo is got from the "privateFileURL". (void)getMediaUrl:(NSString *)assetId
resultHandler:(NSObject <PMResultHandler> *)handler
progressHandler:(NSObject <PMProgressHandlerProtocol> *)progressHandler
if (@available(iOS 9.1, *)) {
if ((asset.mediaSubtypes & PHAssetMediaSubtypePhotoLive) == PHAssetMediaSubtypePhotoLive) {
PHAssetResource *resource = [asset getLivePhotosResource];
NSURL *url = [resource valueForKey:@"privateFileURL"];
if (url) {
[handler reply:url.absoluteString];
return;
}
[self fetchLivePhotosFile:asset handler:handler progressHandler:progressHandler withScheme:YES fileType:nil];
return;
}
}
... In iOS 18, if the "privateFileURL" is used to init the In the other hand, the video url got from the following functions should work. [self fetchLivePhotosFile:asset handler:handler progressHandler:progressHandler withScheme:YES fileType:nil]; |
@dodatw Could you help to confirm if the above comment works in your case? |
Hi Alex, it is work if I call this function directlly
Is it possiable fix in photo_manager ?
|
Please apply the snippet until we fix this in the future release. // https://github.com/fluttercandies/flutter_photo_manager/issues/1196
if (@available(iOS 18.0, *)) {
[self fetchLivePhotosFile:asset handler:handler progressHandler:progressHandler withScheme:YES fileType:nil];
return;
}
PHAssetResource *resource = [asset getLivePhotosResource];
NSURL *url = [resource valueForKey:@"privateFileURL"];
if (url) {
[handler reply:url.absoluteString];
return;
}
[self fetchLivePhotosFile:asset handler:handler progressHandler:progressHandler withScheme:YES fileType:nil];
return; |
Version
3.5.0
Platforms
iOS
Device Model
iPhone 15 (iOS 18)
flutter info
How to reproduce?
After upgrade to iOS 18, I want to Live Photo in video, seem not work anymore.
getMediaUrl => "file:///var/mobile/Media/DCIM/117APPLE/IMG_7666.MOV"
Exception when play this video: PlatformException(VideoError, Failed to load video: The file couldn’t be opened because you don’t have permission to view it., null, null)
I also tried fileWithSubtype
fileWithSubtype => file: File: '/private/var/mobile/Containers/Data/Application/973F8808-BD05-4354-9C1A-FA9CAC5A3AF9/tmp/.video/A10CB802-AB97-48D3-AF8C-9FB5D270BCBB_L0_001_1728264640.877920_o_IMG_7666.MOV'
Exception when play this video: PlatformException(VideoError, Failed to load video: Operation Stopped, null, null)
Is there any special porting need finish in iOS 18?
It play normal at iOS 17 (by getMediaUrl)
Logs
No response
Example code (optional)
No response
Contact
No response
The text was updated successfully, but these errors were encountered: