Screen sharing stops after the app goes into the background

Hello

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?

Thanks!

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.

Thanks!
Michael

Hey @Michael_Condon ,
Initially, I have added RPSystemBroadcastPickerView as subview in my app. When I click this picker view it shows me a list of apps that can broadcast screen. I select my own app from that list and screen is shared successfully. When I click it again, it shows me a list of those apps again where my app is already selected as it is already broadcasting. I click the button of stop broadcast and it stops broadcasting successfully.
I want to bypass this selection process. I want to start and stop screen broadcast on a single button click. I tried ‘startAppShare’ and ‘stopAppShare’ methods of MobileRTCMeetingService. When I call startAppShare method, it gives indication on the web SDK that screen has been shared, but doesn’t show the shared screen. But when I call stopAppShare it stops the screen broadcasting successfully. I need help with the startAppShare method.
Waiting for your kind reply.
Thanks

@Michael_Condon I am using zoom iOS client SDK for custom meeting UI. And I am using the broadcast extension ReplayKit for screensharing as per documentation.

Hey @theclassroomdoor,

Unfortunately, I do not think this is possible and is a limitation of Apple’s frameworks. The start and stop appshare functions can only control sharing if you are not using a broadcast extension.

Thanks!
Michael