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
精彩评论