[ZoomVideoSDK] ScreenSharing does not show

Hello Developer Technical Support Team.

[Technical Environment]

  • Xcode 14.2
  • Zoom Video SDK v1.7.2 (3484)
  • SwiftUI/UIKit
  • Swift Concurrency(async/await)
  • Combine
  • The Composable Architecture
  • Swift Lang 5.x

[DESCRIPTION OF PROBLEM]
We are developing a service that incorporates the Zoom Video SDK for the web and iOS.
However When Screen Sharing from the web (Chrome Browser/Safari/Microsoft Edge), nothing is displayed on the iOS app during the call.

Please advise on how to solve this problem.

The implementation follows the “Zoom Developers - Video SDK Guide”
https://developers.zoom.us/docs/video-sdk/ios/

The iOS App side does not perform “screen sharing”, but only displays the content shared on the Web side.
The work in steps 1 to 7 of the developer guide has been bypassed and implemented from step 8,
“8. Manage the display of the shared content”.
https://developers.zoom.us/docs/video-sdk/ios/share/

(note)
CoreGraphics.framework, CoreVideo.framework, CoreMedia.framework, VideoToolbox.framework and ReplayKit are not integrated into the project.

If the app uses Zoom Video SDK 1.6.4, the shared screen is displayed but crashes, but if it uses 1.7.0 or 1.7.2, it does not crash but nothing is displayed on the screen when shared.

[Step to Procedure]

  1. start a call from the web (Google Chrome)
  2. start a call from the iOS App
  3. The call will start on the web (Google Chrome) and on the iOS App.
  • The iOS App will know that you have joined the call with ZoomVideoSDKDelegate.onSessionJoin.
    4.After the call is established, “screen sharing” starts on the Web (Google Chrome) side.
    5.On the iOS App, onUserShareStatusChanged() notifies that screen sharing has started on the Web (Google Chrome) side.

[program code]

In Delegate “onUserShareStatusChanged()” subscribe the UIView to user.getShareCanvas(), but nothing is actually displayed on the View

Web (Google Chrome) has changed to a shared screen


func onUserShareStatusChanged(_ helper: ZoomVideoSDKShareHelper?, user: ZoomVideoSDKUser?, status: ZoomVideoSDKReceiveSharingStatus) {

    let userShareCanvas = user?.getShareCanvas()

    switch status {
    case .start:
        userShareCanvas?.subscribe(with: self.screenSharedView, andAspectMode: .panAndScan)
    case .stop:
        userShareCanvas?.unSubscribe(with: self.screenSharedView)
    default:
        break
    }
}

@jun.sugai,

Thank you for all the details. Can you share a screenshot of how the video is currently rendering when screensharing ? This helps us diagnose what may be happening.

@donte.zoom

Thank you for reply!
I prepared a ScreenShot but could not paste it here.
It will result in an error containing media content.

Please let me know if you have any good improvement methods.

thanks

1 Like

Thanks for the response, @jun.sugai ! Please see my responses and follow-up questions below:

Can you share more details on why you bypass steps 1 to 7 of the developer guide and implemented from step 8 ?

The Apple video frameworks that were excluded are used to enhance the screen sharing experience. To begin troubleshooting, I suggest testing whether the video renders correctly using the Video SDK iOS Sample App. Please give it a try and inform us of the outcome. I think it’s best that you use the refer to the Sample app during your implementation because it seems that the observed behavior is limited to your application.

It seems like you are receiving the event but not the video feed. Could you please provide us with the crash logs or screenshots? Additionally, when you use version 1.7.0, do you see any console logs when you screen share? Have you added any logging to identify any noticeable differences between the versions? Are all the functionalities working as expected? Have you thoroughly reviewed the code responsible for handling the screen share functionality? Also, if you encounter difficulties uploading a screenshot, as an alternative you can utilize an online tool to upload the image and share the link in the forum instead.

[quote=“Donte, post:4, topic:87160, full:true, username:donte.zoom”]

Thanks for the response, @donte.zoom
Thank you for your kind attention to detail.

I believe Steps 1 to 6 are the steps required to 'Show Screen-Sharing’
Therefore, I don’t think they are necessary steps or frameworks for "Displaying Screen-Sharing”.

In order to avoid unnecessary libraries and complex builds, can you tell us why steps 1 to 7 are necessary for 'displaying the shared screen’?

We have introduced the following libraries into the project as advised and tested the behaviour, but the results did not change.
The Shared Video stream did not render anything.

sorry, but with version 1.7.0 or even newer versions of the SDK, the application does not crash.
It just doesn’t render to the View.
Logs can be shared when nothing is shown

In the log when the connection partner initiates screen sharing.
After this, no other logs were output during screen sharing.

onUserShareStatusChanged Start (view: <UIView: 0x11b50af30; frame = (0 0; 393 393); autoresize = W+H; layer = <CALayer: 0x600002f3a8a0>>)

Log when screen sharing is terminated.

onUserShareStatusChanged Stop (view: <UIView: 0x11b50af30; frame = (0 0; 393 393); autoresize = W+H; layer = <CALayer: 0x600002f3a8a0>>)

The screenshot shows the state of iOS when screen sharing is initiated.
The grey frame shows the view of the screen share.

ViewoSDK 1.7.0 or 1.7.2

VideoSDK 1.6.4 does screen sharing

Are there any other logs required for analysis? We will respond!

ping.

Any news on this?

thank you
sugai

Hi @jun.sugai

I am also trying to reproduce the reported issue here since today, but currently unable to, even after removing all mentioned frameworks related to ‘start’ sharing.
May I ask you a favor to change the parameter of the subscribeWithView as follows?

userShareCanvas?.subscribe(with: self.screenSharedView)

or, set like

userShareCanvas?.subscribe(with: self.screenSharedView, andAspectMode: .original)

as referring to this;
https://marketplacefront.zoom.us/sdk/custom/ios/_zoom_video_s_d_k_constants_8h.html#ac04e2914740fd97a7a82aebe3c155f65

And also would you mind considering to change target render view if applicable, such as the view for counter participant’s view, to test if any change might happen?

Sincerely,
Sugi

Hi @michitaka.sugi

Thanks for the advice.
We will try it as soon as possible and share the results with you.

@jun.sugai
Thank you so much for your team sparing time with me yesterday, and hope you will get well soon.
I could see the issue with your app via TestFlight, but would now need to understand more details about what @donte.zoom advised here;

I assume the logs you had embedded for us is something like stdout perhaps?
And would you mind helping us understand the situation more precisely with the whole SDK logs?

https://marketplacefront.zoom.us/sdk/custom/ios/interface_zoom_video_s_d_k_init_params.html#aefb6c902cab12dbdf417487e3df97858

To save SDK logs and share us, I would like you to do with just set enableLog param on Init.
Default output directory for SDK. log path should be AppData/tmp

thank you,
Sugi

Hi @michitaka.sugi

Thanks for the advice.

Activate VideoSDK’s enableLog flag and try to get the logs.
The logs will be shared later, please wait.

thank you
Sugai

Hi @michitaka.sugi

Sorry.I didn’t share it.
I tried this one, but nothing showed up on the screen.

thank you
Sugai

Hi @michitaka.sugi

sorry i am late.
Logs saved with enableLog true.

thank you
Sugai

@jun.sugai Thank you so much for the SDK log and confirmation.
Will discuss internally with the given log and get back soon.

1 Like

Hi @jun.sugai,

Sorry for the wait. From version 1.7 onwards, receiving share canvas will require an additional library (CptShare.xcframework) under the lib folder. This folder is the same folder where you locate the ZoomVideoSDK.xcframework as well.

Thank you.

Hi @boonjun.tan

Thanks for the information! I’ll give it a try right away.

thank you!

@michitaka.sugi @boonjun.tan @donte.zoom

The problem was resolved when the Zoom Video SDK was updated to 1.7.10 and CptShare.xcframework was added.
thank you very much, guys!

The following libraries could display screen sharing without adding them to the project.

  • CoreGraphics.framework
  • CoreVideo.framework
  • CoreMedia.framework
  • VideoToolbox.framework

It was really helpful. I thank you!

Hi @jun.sugai ,

Great to hear your problem was resolved!

Cheers.

Hi, All

I have a new issue to share with you.

Screen sharing between web and iOS is now possible, but does not work correctly for certain operating procedures or platform combinations.

[Step to Procedure]

  1. start a call from the web (Google Chrome)
  2. start a call from the iOS App
  3. The call will start on the web (Google Chrome) and on the iOS App.
  4. On the web/browser side Enable the camera Turn ON.
  5. Start screen sharing from the browser side.
  6. Screen sharing does not appear on the iOS App side.

[Description of Problem]

If you swap the order of Step 4 and Step 5, it will work correctly
If screen sharing is done first, screen sharing will be displayed.
The camera is also displayed.
but, if the camera is activated first, only the camera’s video will be displayed.

and this problem depends on the environment.

The internet browser we used for our research.
the problem still occurs if the internet browser is changed.

  • Internet Browser
    • Windows
      • Googl eChrome
      • Microsoft Edge
      • FireFox
    • macOS
      • Google Chrome
      • Apple Safari
      • FireFox

Screen sharing after activating the camera is a combination that works correctly

  • iPhone 8 (iOS 14.6)
  • iPhone SE 2(iOS 15.2)
  • iPad Air 2(iOS 15.7.1)
  • iPhone 6S(iOS 15.7.3)
  • iPhone SE 2(iOS 16.5)
  • iPhone SE 3rd Gen (iOS 16.5)
  • iPhone 14 Pro Max(iOS 16.4 )

Screen sharing after activating the camera is a combination that does not display screen sharing

  • iPhone XR(iOS 14.8)
  • iPhone 11 Pro Max(iOS 16.5)
  • iPhone 13 Pro(iOS 15.5)

I have attached the logs I obtained when screen sharing failed.

thank you

@jun.sugai Thank you. Will look into the log.
And to add the preconditions, as per the side conversation, the callback onUserShareStatusChanged start/stop was surely received at the iOS side.

Just to make sure, am I correct to say that the issue is currently observed with those specific devices, and not all of them?

Do you have any suggestion about the issue-reproductive rate? Like, I wonder the issue is actually depends on the device, or the it’s reproduced occasionally(or rarely) in any devices. I would like to double-check for sure.

@michitaka.sugi

thanks for the reply.

yes.
I don’t think this problem is dependent on the version of iOS.
It is occurring only on specific devices.
…and as far as we’ve checked… this applies to devices released after the iPhone X.

It problem always occurs on devices where it does occur.

It has never occurred on a non-defective device.
It’s a difficult problem, but it could depend on the CPU architecture or Xcode build settings.

thank you.