0

我正在 iPhone 3GS 上编写一个简单的视频上传器应用程序,我首先将用户引导到相册,然后选择要共享或上传的视频。我通过以下方式使用 UIImagePickerController:

videoPickerCtrl = [[UIImagePickerController alloc] init]; videoPickerCtrl.delegate = self; videoPickerCtrl.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; videoPickerCtrl.mediaTypes = [UIImagePickerController availableMediaTypesForSourceType:videoPickerCtrl.sourceType];

videoPickerCtrl.allowsImageEditing = 否;videoPickerCtrl.mediaTypes = [NSArray arrayWithObject:(NSString *)kUTTypeMovie]; [窗口 addSubview:videoPickerCtrl.view];

但是我可以看到,一旦调用了控制器,就会出现一个令人不安的视频修剪界面。一旦我按下“选择”,无论我是否触摸修剪控件,视频都会被修剪。有没有办法绕过这个修剪界面,直接获取视频文件的路径?

4

2 回答 2

0

您看到的修剪是 iphone 将视频文件复制到您的应用程序 tmp 目录中,允许您访问它。如果您仍然不明白,请查看 iphone 应用沙盒。

于 2009-10-27T22:39:10.880 回答
0

You don't specify what version of the iPhone SDK that you're using.

If you're using SDK 3.0, there's no way that I'm aware of to eliminate the trimming interface.

If you're using SDK 3.1, try setting UIImagePickerController.allowsEditing to false. In 3.1 the allowsImageEditing has been deprecated for a more general allowsEditing property.

于 2009-09-06T21:28:59.150 回答