Skip to content
戴铭 edited this page Jun 5, 2015 · 1 revision

简介

三种视频捕获方法

  • UIImagePickerController
  • AVCaptureSession + AVMovieFileOutput
  • AVCaptureSession + AVAssetWriter

捕获视频

UIImagePickerController

//判断是否支持相机录制
if ([UIImagePickerController  
       isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
    NSArray *availableMediaTypes = [UIImagePickerController
      availableMediaTypesForSourceType:UIImagePickerControllerSourceTypeCamera];
    if ([availableMediaTypes containsObject:(NSString *)kUTTypeMovie]) {
        // 支持视频录制
    }
}
Clone this wiki locally