Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL
Help

20. Audio, Video, and MediaKit > Recipe: Recording Video - Pg. 184

[self viewDidAppear:NO]; } Get This Recipe's Code To get the code used for this recipe, go to https://github.com/erica/iOS-5-Cookbook, or if you've downloaded the disk image containing all the sample code from this book, go to the folder for Chapter 20 and open the project for this recipe. Recipe: Recording Video Before you can record video, you must detect whether the device supports camera-based video recording. Checking for an onboard camera, such as those in the first generation and 3G iPhones, is not sufficient. Only the 3GS and newer units provide video-recording capabilities. Perform two checks: first, that a camera is available, and second, that the available capture types includes video. The following method performs those checks: - (BOOL) videoRecordingAvailable { // The source type must be available if (![UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]) return NO;