La grabación de inicio del kit de reproducción a veces nunca entra en el controlador de finalización
Estoy usando el kit de reproducción para guardar un video de mi pantalla durante el juego, pero al azar ocasionalmentestartRecordingWithMicrophoneEnabled
yrecorder.stopRecordingWithHandler
nunca entra en el controlador de finalización
no arroja un error, solo se ejecuta y se cuelga indefinidamente.
if recorder.available && recorder.microphoneEnabled {
recorder.startRecordingWithMicrophoneEnabled(true) { [unowned self] (error) in
if let unwrappedError = error {
print(unwrappedError.localizedDescription)
} else {
print("called")
self.manager.instructions.text = "Click to Start Game"
}
}
}
if recorder.available && recorder.microphoneEnabled {
print("initiating stop recording")
recorder.stopRecordingWithHandler { [unowned self] (RPPreviewViewController, error) in
print("in completion handler")
if let previewView = RPPreviewViewController {
print("will transition to gameplay video")
previewView.previewControllerDelegate = self
self.presentViewController(previewView, animated: true, completion: nil)
self.sessionHandler.session.stopRunning()
}
}
}