Reputation: 127
It seems the startRecordWithMicrophone method has been deprecated, but they have implemented a startCapture method that is in beta, am I able to use this beta function? It doesnt come up in my options when using the recorder. I am forced to use the startRecording method which doesn't record the microphone, I have found very limited info on this please help. let recorder = RPScreenRecorder.shared() recorder.startRecording(handler: { (error) in
if let error = error {
print(error)
}
})
Upvotes: 0
Views: 1294
Reputation: 26
You may use startRecording method after setting isMicrophoneEnabled property.
let recorder = RPScreenRecorder.shared()
if recorder.isAvailable {
recorder.isMicrophoneEnabled = true
recorder.startRecording() { error in
if let error = error {
print(error)
} else {
// Recording
}
}
} else {
// Show alert for screen recording being unavailable
}
Upvotes: 1