jitsi / jitsi-meet-sdk-samples

Jitsi Meet mobile SDK examples (Android, iOS and React Native)
Apache License 2.0
270 stars 235 forks source link

Screen Sharing problem on iOS below 16 #170

Open toblAilleron opened 1 year ago

toblAilleron commented 1 year ago

Hi,

I've try to use RPScreenRecorder startCaptureWithHandler:completionHandler: in order to record screen and send the frames using app groups container, like described in guide: https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-ios-sdk/#setting-up-the-socket-connection but without using broadcast extension and recording only my application screen (not the whole device's screen).

On iOS 16 this solution is working perfectly, but on iOS 15 got an error when using startCapture method in completionHandler: ReplayKit error: Code=-5833 "Failed to start due to audio/video capture failure"

This error only occurs when there is active JitsiMeetView on the screen.

Can you help me?

part of my code: RPScreenRecorder.shared().startCapture { sampleBuffer, sampleBufferType, error in if let error { return } guard sampleBufferType == .video else { return } sampleHandler.processSampleBuffer(sampleBuffer, with: sampleBufferType) } completionHandler: { [weak self] error in if let error { } else { sampleHandler.broadcastStarted() } }

saghul commented 1 year ago

Sorry we've never tried that. Why would you not use the broadcast extension model?

toblAilleron commented 1 year ago

In our business scenario we don’t want to share entire iOS screen but only our app’s screen. This can’t be done using broadcast extension.

saghul commented 1 year ago

Right. Sorry, I don't know the answer to your question then.