I have managed to implement a function, with which the user is able to record his screen when pressing a button. I have accomplished that by adding a RPSystemBroadcastPickerView to my respective ViewController:
var picker: RPSystemBroadcastPickerView!
picker = RPSystemBroadcastPickerView(frame: CGRect(x: 0, y: 0, width: 200, height: 200))
self.view.addSubview(picker!)
But my biggest problem is that I don't know how to get the current recorded video from that RPSystemBroadcastPickerView in realtime. I need to get the recorded video as a CMSampleBuffer because I need to send that to another user in my app. Does anybody know how to get the video content from that active recording as CMSampleBuffer?
Note: I am using Swift and Xcode 13.1