Screen sharing stops after the app goes into the background


I am using screen share integrated into my iOS app. I want to put my app in background during the meeting. Before that, I call broadcastPaused method on MobileRTCScreenShareService object. After background I call broadcastResumed method on MobileRTCScreenShareService object and start putting sampleBuffers on the stream. But after that I do not see the video in meeting, but only a static picture - the last frame that was sent before the background. What am I doing wrong?


Hey @stas.hryhoriev,

Thanks for using the dev forum!

The functions broadcastPaused and broadcastResumed are not meant to be called whenever, they are only meant to be called within the respective delegate callbacks of your replay kit handler. Calling these functions outside of these times will lead to unexpected behavior. Since broadcasting is an OS level feature, the user has complete control of when to start and stop their broadcast. You can however, suspend the sharing entirely with suspendSharing in MobileRTCMeetingService.