Error Domain=AVFoundationErrorDomain Code=-11814 "Cannot Record"
This error is because you use an emulator, you need use an device
Regards
Make sure there is only one instance of AVCaptureSession
running.
Having your device restrict the camera access under "Settings > General > Restrictions" will also give you this error.