This ticket can be closed since the issue resolve by just restarting the physical device since its was occurring in this
Post
Replies
Boosts
Views
Activity
I am getting this error @DTS Engineer @yugu
'You don’t have permission. - The AVPlayerItem instance has failed with the error code 257 and domain "NSCocoaErrorDomain".'
Also @DTS Engineer please let me know if something needs to be added in my above code to resolve this error, as i can see i am using the desired API to access the video url
Hi @yugu
May i know how did you resolve this error. Because i am still facing the same issue.
[[PHImageManager defaultManager]
requestAVAssetForVideo:asset
options:videoOptions
resultHandler:^(AVAsset *_Nullable avAsset,
AVAudioMix *_Nullable audioMix,
NSDictionary *_Nullable info) {
if ([avAsset isKindOfClass:[AVURLAsset class]]) {
AVURLAsset *urlAsset = (AVURLAsset *)avAsset;
NSURL *videoURL = urlAsset.URL;
mediaInfo[@"path"] = videoURL.absoluteString;
} else {
// Failed to get video asset
completion(nil);
}
}];