What I need is to have an ongoing meeting where participants will join the waiting room and the host will accept them one by one.
My join code is the following:
ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();
ZoomMtg.init({
leaveUrl: meetConfig.leaveUrl,
isSupportAV: true,
success: function() {
ZoomMtg.join({
signature: {$signature}
,
apiKey: meetConfig.apiKey,
meetingNumber: meetConfig.meetingNumber,
userName: meetConfig.userName,
passWord: meetConfig.passWord,
success: function(res) {
ZoomMtg.record({
record: true
});
ZoomMtg.showRecordFunction({
show: true
});
},
error: function (res) {
console.log(res);
},
})
},
error: function (res) {
console.log(res);
},
})
The signature is produced by the following method
function generateSignature ( $meeting_number, $role)
{
$time = time() * 1000 - 30000;//time in milliseconds (or close enough)
$data = base64_encode($this->apiKey . $meeting_number . $time . $role);
$hash = hash_hmac('sha256', $data, $this->apiSecret, true);
$_sig = $this->apiKey . "." . $meeting_number . "." . $time . "." . $role . "." . base64_encode($hash);
return rtrim(strtr(base64_encode($_sig), '+/', '-_'), '=');
}
join fails when passing role=0 to generateSignature()