janus-gateway-ios icon indicating copy to clipboard operation
janus-gateway-ios copied to clipboard

screen share function

Open fukemy opened this issue 4 years ago • 0 comments

hi, first thanks for great lib, my project is running with your base code well for > 1 years, now i need to implement screen share( done in android).

In ios, i found need to use RpScreenRecorder to get RTCCVPixelBuffer like below

 RPScreenRecorder.shared().startCapture { cmSampleBuffer, rpSampleType, error in
            switch rpSampleType {
                
                
                
            case RPSampleBufferType.video:
                // create the CVPixelBuffer
                guard let pixelBuffer: CVImageBuffer = CMSampleBufferGetImageBuffer(cmSampleBuffer) else {
                    break
                    
                }
                
                let rtcpixelBuffer = RTCCVPixelBuffer(pixelBuffer: pixelBuffer)
....

but i dont know how to continues, how to add create video track from this.... etc. Can u help? Thanks in advances

fukemy avatar Oct 07 '21 08:10 fukemy