gpt4 book ai didi

ios - 无法将视频加载到 UIVideoEditorController

转载 作者:塔克拉玛干 更新时间:2023-11-02 07:59:47 27 4
gpt4 key购买 nike

我收到一个错误,其中 UIVideoEditorController 无法找到已使用 UIImagePicker 加载并存储在词典。

我正在使用以下内容,但 canEditVideoAtPath 为以下网址返回 false:

file:///private/var/mobile/Containers/Data/Application/83449852-2DC2-42AB-9FFA-C2C7931380C4/tmp/trim.28F7EE00-9F2E-4421-8E2B-8A70789CAFDE.MOV

知道为什么以下代码不起作用吗?

NSLog(@"%@",[[self.movieArray objectAtIndex:[sender tag]] objectForKey:@"MovieURL"]);

NSString *videoPath = [NSString stringWithFormat:@"%@",[[self.movieArray objectAtIndex:[sender tag]] objectForKey:@"MovieURL"]];

UIVideoEditorController *editorController = [[UIVideoEditorController alloc] init];

if([UIVideoEditorController canEditVideoAtPath:videoPath]){

editorController.videoPath = [NSString stringWithFormat:@"%@",[[self.movieArray objectAtIndex:[sender tag]] objectForKey:@"MovieURL"]];
editorController.delegate = self;
editorController.videoQuality = UIImagePickerControllerQualityTypeHigh;

self.popoverController = [[UIPopoverController alloc] initWithContentViewController:editorController];
self.popoverController.delegate = self;
[self.popoverController presentPopoverFromRect:((UIButton *)sender).bounds inView:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];

}

我收到错误信息

The requested URL was not found on this server

最佳答案

从路径字符串中删除file://

关于ios - 无法将视频加载到 UIVideoEditorController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25869326/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com