Im using replaykit and broadcast upload extension to get devices screen recording.
override func processSampleBuffer(_ sampleBuffer: CMSampleBuffer, with sampleBufferType: RPSampleBufferType) {
switch sampleBufferType {
case .video:
break
case .audioApp:
break
case .audioMic:
break
@unknown default:
break
}
With the function above I can get the sampleBuffer of the recording. How would I convert it to m3u8 and save it? It needs to be m3u8 because I will be hosting the file in localserver so it can be played real-time.