मैं पुनरावृत्ति किट का उपयोग कर रहा हूँ बस गेम के दौरान लेकिन बेतरतीब ढंग से अवसर startRecordingWithMicrophoneEnabled
पर और recorder.stopRecordingWithHandler
अपनी स्क्रीन के एक वीडियो को बचाने के लिए कभी नहीं पूरा होने हैंडलरreplaykit startrecording कभी कभी कभी नहीं प्रवेश करती है पूरा होने हैंडलर
यह एक त्रुटि फेंक नहीं है में प्रवेश करती है, यह करने के लिए रन और अनिश्चित काल तक लटका।
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()
}
}
}
आपको स्टार्ट रिकॉर्डिंग कॉल करने से पहले स्क्रीन रिकॉर्डर और माइक्रोफ़ोन उपलब्ध है या नहीं, यह जांचने की आवश्यकता है। –
मैंने इसे जोड़ा, लेकिन समस्या – stanley
बनी हुई है कृपया उपर्युक्त चेक के साथ प्रश्न अपडेट करें। –