我正在swift 3中设置一个带有以下功能的摄像机控制器:
let cameraController = UIImagePickerController()
cameraController.sourceType = .camera
cameraController.mediaTypes = [kUTTypeMovie as NSString as String]
cameraController.showsCameraControls = true
cameraController.videoQuality = UIImagePickerControllerQualityType.typeHigh
cameraController.allowsEditing = false
cameraController.delegate = delegate
present(cameraController, animated: false, completion: nil)
这会记录视频和音频,因此要求访问摄像头和麦克风。音频在这里完全没用。
如何录制视频,但禁用麦克风以便不录制音频,以便不会询问是否允许使用麦克风?