@MichaelScaria, , , 3 . , AVAssets URL- URL-
+ (AVAsset*)getAVAssetFromRemoteUrl:(NSURL*)url
{
if (!NSTemporaryDirectory())
{
}
NSURL *tmpDirURL = [NSURL fileURLWithPath:NSTemporaryDirectory() isDirectory:YES];
NSURL *fileURL = [[tmpDirURL URLByAppendingPathComponent:@"temp"] URLByAppendingPathExtension:@"mp4"];
NSLog(@"fileURL: %@", [fileURL path]);
NSData *urlData = [NSData dataWithContentsOfURL:url];
[urlData writeToURL:fileURL options:NSAtomicWrite error:nil];
AVAsset *asset = [AVAsset assetWithURL:fileURL];
return asset;
}
+ (AVAsset*)getAVAssetFromLocalUrl:(NSURL*)url
{
AVURLAsset *asset = [AVAsset assetWithURL:url];
return asset;
}