I have created a Zoom bot to join meetings to send and receive audio, video streams. Right now, I am trying to achieve two things:
- Mute the audio stream - the bot doesn’t need to speak
- Unmute the video stream - the bot needs to send a video stream
I am unable to it.
These are my configurations when the bot joins a call:
ZOOM_SDK_NAMESPACE::JoinParam4WithoutLogin &withoutloginParam = joinParam.param.withoutloginuserJoin;
// ...
withoutloginParam.isVideoOff = false;
withoutloginParam.isAudioOff = true;
// ...
ZOOM_SDK_NAMESPACE::IAudioSettingContext *pAudioContext = m_pSettingService->GetAudioSettings();
if (pAudioContext)
{
pAudioContext->EnableAutoJoinAudio(true);
}
ZOOM_SDK_NAMESPACE::IVideoSettingContext *pVideoContext = m_pSettingService->GetVideoSettings();
if (pVideoContext)
{
pVideoContext->EnableAutoTurnOffVideoWhenJoinMeeting(false);
}
ZOOM_SDK_NAMESPACE::SDKError join_err = m_pMeetingService->Join(joinParam)
This is how I am trying to mute the audio:
IMeetingAudioController *meetingAudController = m_pMeetingService->GetMeetingAudioController();
auto my_user_id = m_pParticipantsController->GetMySelfUser()->GetUserID();
SDKError err = meetingAudController->MuteAudio(my_user_id, true);
if (err != SDKError::SDKERR_SUCCESS)
{
printf("Error muting audio. SDKError code: %d\n", err);
return;
}
And, here is how I am trying to unmute the video:
IMeetingVideoController *meetingController = m_pMeetingService->GetMeetingVideoController();
meetingController->UnmuteVideo();
Neither the audio is muted nor the video is unmuted.
And, I noticed something. My code gets stuck when I try to initialise the audio and video controllers:
IMeetingAudioController *meetingAudController = m_pMeetingService->GetMeetingAudioController();
When I say stuck, I mean that the code doesn’t even move to the next line.
Is this a permissions issue? Am I doing something wrong here? Can someone help?