Zoom Video SDK IOS v2.4.5 ShareScreen Issue

Hi,

Our team is currently using the latest Zoom Video iOS SDK (v2.4.5). As part of our requirements, we need to leave the Zoom session whenever the user backgrounds the app. When we detect a backgrounding event, we call:

ZoomVideoSDK.shareInstance()?.leaveSession("false")

This works without any issues as long as no one is sharing their screen.

However, we’re running into a problem when another participant is sharing their screen. If a user backgrounds the app during an active screen share (from another user), then returns to the foreground and rejoins the session, the shared screen appears blank. At that point, there’s no way for the returning user to recover the screen share view.

The only workaround we’ve found is:

  1. Have the returning user call

    ZoomVideoSDK.shareInstance()?.getShareHelper()?.stopShare()
    

    (even though they were not the one sharing),

  2. Wait for the

    onUserShareStatusChanged(...)
    

    callback,

  3. Then call

    ZoomVideoSDK.shareInstance()?.leaveSession("false")
    

This feels like an unintended behavior. In earlier SDK versions, calling leaveSession() handled this scenario cleanly, so it seems like the share helper state may not be fully reset when leaving a session during an active screen share.

Is there a recommended or more appropriate way to handle app backgrounding while another participant is sharing their screen?
Tagging @ekaansh.zoom, @boonjun.tan, and @gianni.zoom in case you have guidance.

Thanks so much for your help!

1 Like

Hi @prw3100,

Before I give you the right solution, I will need to find out more on your use case.

  1. When the user leaves the session during app background mode, what is the intended behaviour that you would like the user to have when they move your app back to foreground?
  2. Are you calling the join session again?
  3. If yes, upon joining back the session, did you get the onUserShareStatusChanged callback triggered for the other person already sharing the screen?