In custom Meeting UI, Audio not coming / listening through speaker

Description

Hi Team,

We have started a meeting successfully and able to do all functions. But we are facing some issues while hearing sound on the Host side. On the guest side, there is no issues on hearing a sound

The host can’t able to hear the participants sound in their phone speaker whereas they can able to hear in their earpiece.

Please find the code snippet:

    if let meetingService = MobileRTC.shared().getMeetingService(){
        
        if let meetingSettings = MobileRTC.shared().getMeetingSettings(){
            meetingSettings.setMuteAudioWhenJoinMeeting(false)
            meetingSettings.setMuteVideoWhenJoinMeeting(false)
            meetingSettings.meetingVideoHidden = false
            meetingSettings.meetingAudioHidden = false
            meetingSettings.meetingChatHidden = false
            meetingSettings.enableCustomMeeting = true
            meetingSettings.setAutoConnectInternetAudio(true)
            meetingSettings.topBarHidden = true
            meetingSettings.bottomBarHidden = true
        }
        meetingService.delegate = self
        meetingService.customizeMeetingTitle("ShareLinkTitle".localized)
        meetingService.connectMyAudio(true)

       let zakToken = ZoomMeetingService.requestTokenOrZAK(with: MobileRTCSampleTokenType_ZAK, userId: self.zoomUserId)
       let user = MobileRTCMeetingStartParam4WithoutLoginUser.init()
       user.userType = MobileRTCUserType_APIUser
       user.userID = self.zoomUserId
       user.userName = PTStorageManager.shared.userFirstName
       user.zak = zakToken
       user.meetingNumber = meetingId
       param = user
       let error = meetingService.startMeeting(with: param)
       print(error)
    }

Which version?
v5.0.24433.0616

Please let us know how to resolve this.

Hi @pandiyaraj,

Thanks for the post. Is the code for the host and the participants the same? Is the audio icon on the host side shown as connected? (If the audio is not connected, then there will not be any audio for both input/output) Based on the code snippet, everything looks good. Could you provide an SDK log for the host side when this issue happens?

Thanks!

Thanks for the reply @Carson_Chen,

For the participant side i am using Default UI method. Yes the audio is connected(Connect via internet audio) it shows audio button in enabled state to all.

Host also able to hear the sound in their normal earphone instead of speaker.

This issue didn’t happened on iPad only the problem is coming in iPhone.

Hi @Carson_Chen,

Any update on this?

Hi @pandiyaraj,

Thanks for the reply. We have tried to reproduce this with our demo app but we are not able to experience the issue, and there are no other customers reporting the same issue. Could you provide an SDK log that has this issue for us to further investigate? Is the Zoom Client working well on the host’s device?

Thanks!

Thanks for the reply @Carson_Chen

The problem is in my side, I have added below code snippet i guess it automatically switches speaker to earphones, After commenting this line it works fine to all users.

[[[MobileRTC sharedRTC] getMeetingService] switchMyAudioSource]

Thanks

Hi @pandiyaraj,

Glad to hear that! Then I will go ahead and close this thread. Please feel free to create another post if any other questions. :slight_smile: