开发者

Video capture code does not work on iphone 4

I have captured video in iPhone 3GS using the UiImagePickerController, but the same app does not engage the Video camera on iPhone 4,it is also working fine on iPhone 3GS (OS 4).

Following is the code i used to engage the video camera.

UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.mediaTypes =  [NSArray arrayWithObject:(NSString *)kUTTypeMovie];
imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
imagePicker.delegate = self;
[self presentModalViewController:imagePicker animated:YES];   
[imagePicker r开发者_如何学JAVAelease];


You need to specify your UIImagePickerControllerCameraDevice to either UIImagePickerControllerCameraDeviceRear or UIImagePickerControllerCameraDeviceFront on the iPhone 4

Also, set

UIImagePickerControllerCameraCaptureMode to UIImagePickerControllerCameraCaptureModeVideo

iPhone UIImageController Reference

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜