你好,所以我试图使用AVCaptureFileOutputRecordingDelegate。
extension FSVideoCameraView: AVCaptureFileOutputRecordingDelegate{
func captureOutput(_ captureOutput: AVCaptureFileOutput!, didStartRecordingToOutputFileAtURL fileURL: URL!, fromConnections connections: [AnyObject]!) {
print("started recording to: \(fileURL)")
}
func captureOutput(_ captureOutput: AVCaptureFileOutput!, didFinishRecordingToOutputFileAtURL outputFileURL: URL!, fromConnections connections: [AnyObject]!, error: Error!) {
print("finished recording to: \(outputFileURL)")
self.delegate?.videoFinished(withFileURL: outputFileURL as NSURL)
}
}
它一直给我一个错误:
extension FSVideoCameraView: AVCaptureFileOutputRecordingDelegate{
答案 0 :(得分:0)
我刚想通了,我将[AnyObject]更改为[Any]并修复了它。