Taking video on iPhone

164 views Asked by At

I am trying to get the same effect as facetime. With the users current video feed displaying in the lower left of the screen. I am also trying to record that video so the user can save it later... What is the best approach to do this?

1

There are 1 answers

0
Kyle Clegg On

Take a look at Apple's Guide

Excerpt:

Starting in iPhone OS 3.0, you can record video, with included audio, on supported devices. To display the video recording interface, create and push a UIImagePickerController object, just as for displaying the still-camera interface.

To record video, you must first check that the camera source type (UIImagePickerControllerSourceTypeCamera) is available and that the movie media type (kUTTypeMovie) is available for the camera. Depending on the media types you assign to the mediaTypes property, the picker can directly display the still camera or the video camera, or a selection interface that lets the user choose.

Using the UIImagePickerControllerDelegate protocol, register as a delegate of the image picker. Your delegate object receives a completed video recording by way of the imagePickerController:didFinishPickingMediaWithInfo: method.

On supported devices, you can also pick previously-recorded videos from a user’s photo library.

For more information on using the image picker class, see UIImagePickerController Class Reference. For information on trimming recorded videos, see UIVideoEditorController Class Reference and UIVideoEditorControllerDelegate Protocol Reference.

Once you successfully have the video in your UIImagePickerController delegate you can then save it to your app's documents directory using standard file operations.