Can the guest disconnect the host's audio? Is it possible to reconnect after disconnecting?

Description

Can the guest disconnect the host’s audio?
Is it possible to reconnect after disconnecting?

Which version?

iOS 14.1
iOS SDK v5.2.41735.0928

Additional context

I’m writing an iOS app for guests using Zoom’s custom UI.
The app I’m writing uses UIPageViewController to switch between Zoom and WebView pages.

I want to realize the following functions

  • Guests attend Zoom meetings
  • Guests watch Video in WebView
  • The guest does not hear the host’s audio when the WebView page is open.
  • The host also receives the guest’s voice and appearance while the guest is watching the video.

** What you want to achieve

I want to disconnect the Zoom audio and connect it to the WebView Video audio by guest operation.
Also, I want to disconnect the audio of WebView and connect to the audio of Zoom by the operation of the guest.

** Current problem

While watching a video in WebView, I can’t hear the video and I can hear the Zoom.

** What I tried

Looking at the past logs, I added the following code.

[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord withOptions:AVAudioSessionCategoryOptionMixWithOthers error:nil];

Hey @t.yamamoto,

Thanks for using the dev forum!

Only the host can control another user’s audio, and it is limited to muting/unmuting.

However, a user can connect/disconnect their own audio using - ( BOOL )connectMyAudio:( BOOL )on; in MobileRTCMeetingService.

Thanks!
Michael

I couldn’t hear the WebView audio when I added the following code.

[[[MobileRTC sharedRTC] getMeetingService] connectMyAudio: NO]

When navigating from the Zoom page to the WebView page, I added the following code and I heard the WebView audio.

[[[MobileRTC sharedRTC] getMeetingService] connectMyAudio: NO]

NSError * error = nil;
AVAudioSession * session = [AVAudioSession sharedInstance];
[session setCategory: AVAudioSessionCategoryPlayback error: & error];
[session setMode: AVAudioSessionModeMoviePlayback error: & error];
[session setActive: YES error: & error];

However, when I return to the Zoom page, I add the following code and I can’t hear the Zoom audio.
The guest’s voice is not heard by the host, and the host’s voice is not heard by the guest.

NSError * error = nil;
AVAudioSession * session = [AVAudioSession sharedInstance];
[session setCategory: AVAudioSessionCategoryPlayAndRecord
         withOptions: AVAudioSessionCategoryOptionMixWithOthers | AVAudioSessionCategoryOptionDuckOthers
               error: & error];
[session setMode: AVAudioSessionModeVideoChat error: & error];
[session overrideOutputAudioPort: AVAudioSessionPortOverrideSpeaker error: & error];
[session setActive: YES error: & error];

[[[MobileRTC sharedRTC] getMeetingService] connectMyAudio: YES]

Could you give me some advice?

Hey @t.yamamoto

What is the session category when in the Zoom page, before the navigating to the WebView page?
Also are any of the callbacks within MobileRTCAudioServiceDelegate being hit upon switching back and forth between pages?

Thanks!
Michael

What is the session category when in the Zoom page, before the navigating to the WebView page?

I’m in the main room

Also are any of the callbacks within MobileRTCAudioServiceDelegate being hit upon switching back and forth between pages?

I had the following call.

When navigating from the Zoom page to the WebView page:

SDKAudioPresenter.connectMyAudio on=0
[IOS].InitAudioUnit mic is enable 0
[session setActive:YES error:&error];
SDKStartJoinMeetingPresenter.onSinkMeetingMyAudioTypeChange
SDKStartJoinMeetingPresenter.onAudioOutputChange

When returning from the WebView page to the Zoom page:

[session setActive:YES error:&error];
SDKAudioPresenter.connectMyAudio on=1
[IOS].InitAudioUnit mic is enable 1
SDKStartJoinMeetingPresenter.onSinkMeetingMyAudioTypeChange
SDKStartJoinMeetingPresenter.onAudioOutputChange

This issue does not occur in the following versions:

  • iOS SDK v5.0.24433.0616 + iOS 13.6.1
  • iOS SDK v5.0.24433.0616 + iOS 14.1

It occurs in the following versions.

  • iOS SDK v5.2.41735.0928 + iOS 13.6.1
  • iOS SDK v5.2.41735.0928 + iOS 14.1

In iOS SDK v5.0.24433.0616, I used the following code.

When going from the Zoom page to the WebView page

[self.audioPresenter muteMyAudio];

When going from the WebView page to the Zoom page

[[[MobileRTC sharedRTC] getMeetingService] connectMyAudio: YES];
[[[MobileRTC sharedRTC] getMeetingService] muteMyAudio: NO];

Hey @t.yamamoto,

Thank you for providing the additional context. This does seem like a bug and should be investigated further.

Can you reproduce the issue on the v5.2.41735.0928 version once more and obtain the SDK logs for that app instance? To obtain the logs, follow the directions at the bottom of this page: https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/sdk-initialization.
The log file itself will be encrypted, which is intentional. Please attach the logs in an email to developersupport@zoom.us. When you send the email please include the following:

  1. The SDK Logs
  2. Clear reproduction steps
  3. Versions effected
  4. Any relevant code (the more the better)
  5. Any relevant screenshots
  6. Any other additional context
  7. Mention either my name (Michael Condon) or a link to this post
  8. If the issue can be reproduced in an isolated sample application or our sample application, the resolution is usually faster. If you decide to go this route, please include the Xcode project with the bug.

From there we will try and reproduce the issue in our applications, and will provide you with updates as they come up.

Thanks!
Michael

1 Like