Zoom Custom UI ans screen sharing IOS swift

Description
Hi,
I am working on zoom iOS swift. I need help with zoom custom meeting swift code. We have already integrated start ans join meeting. Now we want custom meeting ui and share screen functionality.
can anyone help with that?
I am trying to convert objective c code to swift. But I am getting so many errors.
It will be helpful if you can provide swift code for custom meeting.

Which version?
Latest 4.6

Smartphone (please complete the following information):

  • Device: All
  • OS: Above 11.0

Additional context
I am trying to convert objective c code to swift. But I am getting so many errors. It will be helpful if you can provide swift code for custom meeting.

Hi @eldhose.m,

Thanks for the post. Could you provide the errors you are getting? Are you using v4.6.21666.0428?

We have a controller named ‘PresentationVC’. We need start custom meeting when I tap a button on this ViewController.

guard let ms = MobileRTC.shared().getMeetingSettings() else {return}
ms.enableCustomMeeting = true
MobileRTC.shared().getMeetingService()?.customizedUImeetingDelegate = self
ZoomService.sharedInstance.startMeeting(password: “”)

This is the code I am using to start custom meeting.

extension PresentationVC : MobileRTCCustomizedUIMeetingDelegate {
func onInitMeetingView() {
print("PresentationVC onInitMeetingView ")
let vc = CustomMeetingViewController()
// self.customMeetingVC = vc
addChild(vc)
vc.view.frame = self.view.bounds
view.addSubview(vc.view)
vc.didMove(toParent: self)
}

func onDestroyMeetingView() {
    print("PresentationVC onInitMeetingView ")
}

}

If I use only below code, normal meeting will start. We want custom meeting.
ZoomService.sharedInstance.startMeeting(password: “”)

hi @Carson_Chen,

if ms?.isStartingShare != nil {
print(“startOrStopAppShare if – (ms)”)
ms?.stopAppShare()
} else {
print(“startOrStopAppShare else – (ms)”)
ms?.startAppShare()
}

I cannot start sharing because of this. Always it goes to ‘if’ condition.

Hi @eldhose.m,

Thanks for the reply. For the screen sharing, please follow the instruction here to implement the screen sharing feature.: https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/in-meeting-function/zoom-meeting-ui/screen-share.

And regarding the start meeting implementation, you may refer to the implementation in our demo app: https://github.com/zoom/zoom-sdk-ios/tree/master/MobileRTCSample/MobileRTCSample; Here is a sitemap for the demo app: https://github.com/zoom/zoom-sdk-ios#navigating-sdk-sample-files

Thanks!

Hi we integrated screen share also.

Mobile video’s audio is not working. (eg: YouTube video sound for the participants)
Also how can I start more than one meeting at a time?

Hi @eldhose.m,

Thanks for the reply. If the first button in the following screenshot on?

The Share Device audio function needs to turn on in order to share audio.

Start multiple meetings using the same SDK is not supported.

Thanks!

This screen is not visible after starting broadcast. Screen share is working. But this screen is not coming.

We also checked on your objective c demo code. Broadcasting is not working on the demo.
Can you help us for enabling device audio? Objective c or swift code for this?

@Carson_Chen When we tap on share screen, broadcasting screen is appearing to start screen share. But after dismissing that by tapping the screen again, above screen is not visible. We can see on video screen. Is there a way to see this screen after starting broadcast?

How can I enable that screen? Is there any function to enable this?

The broadcasting extension in our demo app is only for demo purpose, you will need to create your own broadcast extension in order to make it work(Xcode does not recognize the broadcast extension we created for you).

Once you follow the instruction https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/in-meeting-function/zoom-meeting-ui/screen-share to implement the screen share feature, you will see the screen I mentioned above. You may press on the “Share Device Audio” to enable audio sharing.

If you are broadcasting other screens and want to see the screen that has the “Share Device Audio” button, you could go back to your SDK app and it will show up.

Thanks!

We followed the instruction https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/in-meeting-function/zoom-meeting-ui/screen-share to implement the screen share feature. Still above mentioned screen is not showing up.

Broadcasting is working fine. Attached screenshot for your reference. After this screen showed up i can start and stop screensharing.

But after dismissing that view i cannot see ‘share device audio’ screen.

Do i need to enable thai in code? It is not getting enabled. Please help

We followed the instruction https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/in-meeting-function/zoom-meeting-ui/screen-share to implement the screen share feature. Still above mentioned screen is not showing up.

Broadcasting is working fine. Attached screenshot for your reference. After this screen showed up i can start and stop screensharing.

But after dismissing that view i cannot see ‘share device audio’ screen.

Do i need to enable thai in code? It is not getting enabled. Please help

Thanks.

@Carson_Chen
we have implemented this below method

  • (void)onClickShareScreen:(UIViewController*)parentVC;

But it is not getting called.
Also we added ’ MobileRTC.shared().getMeetingService()?.delegate = self’

Still ‘onClickShareScreen’ not getting called.

When we tap on ‘sharebutton’ on bottom panel, what will be the code to get screen share working?
we are using custom meeting.
Now we are calling ‘sharePresenter?.startOrStopAppShare()’ this.
func startOrStopAppShare() {
let ms = MobileRTC.shared().getMeetingService()
if ms != nil {
if ((ms?.isStartingShare())!){
print(“startOrStopAppShare if – (ms)”)
ms?.stopAppShare()
} else {
print(“startOrStopAppShare else – (ms)”)
ms?.startAppShare()
}
}
}

Using this we can only share app screen. We need broadcasting and device audio. Please suggest any solution

we have implemented this below method

  • (void)onClickShareScreen:(UIViewController*)parentVC;

But it is not getting called.
Also we added ’ MobileRTC.shared().getMeetingService()?.delegate = self’

Still ‘onClickShareScreen’ not getting called.

When we tap on ‘sharebutton’ on bottom panel, what will be the code to get screen share working?
we are using custom meeting.
Now we are calling ‘sharePresenter?.startOrStopAppShare()’ this.
func startOrStopAppShare() {
let ms = MobileRTC.shared().getMeetingService()
if ms != nil {
if ((ms?.isStartingShare())!){
print(“startOrStopAppShare if – (ms)”)
ms?.stopAppShare()
} else {
print(“startOrStopAppShare else – (ms)”)
ms?.startAppShare()
}
}
}

Using this we can only share app screen. We need broadcasting and device audio. Please suggest any solution

@Carson_Chen

Description
We have integrated screen sharing but the audio of videos played on the device from which screen is shared is not audible to other participants. The audio via mic is audible. We are using custom UI.
Which version?
mobileRTCVersion - 4.6.21666.0428
Screenshots


When we start broadcasting this particular UI doesn’t appear in our custom UI. Which method is called to toggle Share Device Audio. Please refer to the screenshot.
Smartphone (please complete the following information):

  • Device: iPhone 6 plus–Software version- 12.4.6 / iPhone 11–Software version- 13.3.1
    Additional context
    Is there any way we can toggle the Share Device Audio programmatically in our own custom UI.

We are using below code to start broadcast:
if #available(iOS 12.0, *) {
let broadcastView = RPSystemBroadcastPickerView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.size.width / 2, height: UIScreen.main.bounds.size.height / 2))
broadcastView.preferredExtension = “com.fastforward.app.infiny.screenshare”
let buttonPressed = NSSelectorFromString(“buttonPressed:”)
if broadcastView.responds(to: buttonPressed) {
//broadcastView.perform(buttonPressed, with: nil)
for subview in broadcastView.subviews {
print(“broadcastView.subviews”,broadcastView.subviews)
if let button = subview as? UIButton {
button.sendActions(for: UIControl.Event.allTouchEvents)
}
}
} else {
// Fallback on earlier versions
}
}

Please reply asap.

Hi,

It has been 4 days since we sent the above query. Can you please provide objective-c or swift code for share screen functionality in custom meeting in ios.

We have implemented screen sharing using below code:

if #available(iOS 12.0, *) {

let broadcastView = RPSystemBroadcastPickerView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.size.width / 2, height: UIScreen.main.bounds.size.height / 2))

broadcastView.preferredExtension = “com.fastforward.app.infiny.screenshare”

let buttonPressed = NSSelectorFromString(“buttonPressed:”)

if broadcastView.responds(to: buttonPressed) {

//broadcastView.perform(buttonPressed, with: nil)

for subview in broadcastView.subviews {

print(“broadcastView.subviews”,broadcastView.subviews)

if let button = subview as? UIButton {

button.sendActions(for: UIControl.Event.allTouchEvents)

}

}

} else {

// Fallback on earlier versions

}

}

But device audio is not getting shared. It will be helpful if you can share objective-c or swift code for share screen functionality in custom meeting in ios.

thanks

Hi @eldhose.m,

Thanks for the reply and the follow-up. Pardon the late response due to high demands on support and the limited bandwidth here. Based on the code snippet, it seems like you are using Custom UI. The audio share interface is currently not available in the Custom UI. I have forwarded this as a feature request to the engineering team.

Thanks!

Hi @Carson_Chen,
When we had first enquired about this issue on June 6th and the response from your side was positive stating it should work. We have since then continued development for the custom UI for the Zoom meeting and this audio share is the last task pending. Is there any way we can implement this feature ourselves programmatically without the default interface if not by when can we expect this feature?. We are required to complete this project by the end of this week. I request you to provide further support for this issue. It will be helpful if you can provide a solution to this feature by the end of this week.

Hi @alexander.j,

Thanks for the reply. Pardon the confusion and inconvenience here. The screenshot and the “audio share working” reply was for the Zoom default UI. It is unfortunate that this interface is currently not available on Custom UI. I have submitted a feature request to the engineering team for this interface but it will take some time to develop. I could keep you updated.

Thanks!