Start, join, and leave meetings
Start a meeting
To start a meeting, initialize the StartParam data structure.
- Set the
userTypetoZOOM_SDK_NAMESPACE::SDK_UT_NORMALUSER;. - Populate the
normaluserStartstructure of the startParam.- Set the
meetingNumberto the meeting number of the meeting to start. - Set the
vanityIDif there is avanityID. - Set the
customer_keyif there is acustomer_key. - Set
isAudioOffandisVideoOffto eithertrueorfalse.
- Set the
- Call the
Start()method to start a meeting.
ZOOM_SDK_NAMESPACE::StartParam startParam;
startParam.userType = ZOOM_SDK_NAMESPACE::SDK_UT_NORMALUSER;
startParam.param.normaluserStart.vanityID = NULL;
startParam.param.normaluserStart.customer_key = NULL;
startParam.param.normaluserStart.isVideoOff = false;
startParam.param.normaluserStart.isAudioOff = false;
ZOOM_SDK_NAMESPACE::IMeetingService* m_pMeetingService = SDKInterfaceWrap::GetInst().GetMeetingService();
ZOOM_SDK_NAMESPACE::SDKError err = m_pMeetingService->Start(startParam);
Get the Start Meeting status
To know whether the start meeting action succeeded, didn't succeed, or resulted in an error, implement the onMeetingStatusChange method.
virtual void onMeetingStatusChanged(MeetingStatus status, int iResult = 0) = 0;
Check MeetingStatus definition in meeting_service_interface.h.
Join a meeting
To join a meeting identified by a meeting number, populate the JoinParam data structure. This shows joining a meeting as an anonymous user.
- Set the
userTypetoSDK_UT_WITHOUT_LOGIN;. - To join without login, populate the
JoinParam4WithoutLogindata structure.- Set the
meetingNumber. - Set the
vaniyIDif there is avanityID. - Set the
userNameandpsw(password). - Set the
customer_keyif there is acustomer_key. - Set the
webinarTokenif joining a webinar. Otherwise, leave it asNULL. - Set the
isAudioOffandisVideoOff, depending on the desired audio and video setting.
- Set the
- Call the
Join()method to join the meeting.
ZOOM_SDK_NAMESPACE::JoinParam joinParam;
joinParam.userType = ZOOM_SDK_NAMESPACE::SDK_UT_WITHOUT_LOGIN;
ZOOM_SDK_NAMESPACE::JoinParam4WithoutLogin& withoutloginParam = joinParam.param.withoutloginuserJoin;
withoutloginParam.meetingNumber = <meeting number>;
withoutloginParam.vanityID = NULL;
withoutloginParam.userName = "";
withoutloginParam.psw = "";
withoutloginParam.customer_key = NULL;
withoutloginParam.webinarToken = NULL;
withoutloginParam.isVideoOff = true;
withoutloginParam.isAudioOff = false;
ZOOM_SDK_NAMESPACE::IMeetingService* m_pMeetingService = SDKInterfaceWrap::GetInst().GetMeetingService(); m_pMeetingService->Join(joinParam);
Get the Join Meeting status
To know whether the join meeting action is a success or not, or to get the error message, implement the onMeetingStatusChange method.
virtual void onMeetingStatusChanged(MeetingStatus status, int iResult = 0) = 0;
Check MeetingStatus definition in meeting_service_interface.h.
Leave a meeting
- Use the
LeaveMeetingCmdenum to decide whether to leave or end a meeting. - Use the appropriate
LeaveMeetingCmdenum to eitherLEAVE_MEETINGorEND_MEETING. - Use the
Leave()method to leave a meeting.
ZOOM_SDK_NAMESPACE::IMeetingService* m_pMeetingService = SDKInterfaceWrap::GetInst().GetMeetingService();
m_pMeetingService->Leave(ZOOM_SDK_NAMESPACE::LEAVE_MEETING);