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 release];
You need to specify your UIImagePickerControllerCameraDevice
to either UIImagePickerControllerCameraDeviceRear
or UIImagePickerControllerCameraDeviceFront
on the iPhone 4
Also, set
UIImagePickerControllerCameraCaptureMode
to UIImagePickerControllerCameraCaptureModeVideo
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.