Using this code, it shows that “Join meeting timeout”. “Fail to join the meeting”.
ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();
document.getElementById('join_meeting').addEventListener('click', () => {
const meetingNumber = '83557291723';
const role = 0; // 0 for attendee, 1 for host
const leaveUrl = 'http://localhost:3000';
const userName = 'client';
const userEmail = ''; // Optional
const passWord = ''; // Set password if meeting requires it
// Generate the meeting signature
ZoomMtg.generateSignature({
meetingNumber: meetingNumber,
apiKey: API_KEY,
apiSecret: API_SECRET,
role: role,
success: function (res) {
console.log('Signature generated: ', res.result);
ZoomMtg.init({
leaveUrl: leaveUrl,
isSupportAV: true,
success: function () {
console.log('Zoom Meeting initialized successfully');
ZoomMtg.join({
meetingNumber: meetingNumber,
userName: userName,
signature: res.result,
apiKey: API_KEY,
userEmail: userEmail,
passWord: passWord,
success: function (res) {
console.log('Join meeting success');
console.log('Zoom response: ', res);
},
error: function (res) {
console.error('Join meeting error: ', res);
}
});
},
error: function (res) {
console.error('Zoom init error: ', res);
}
});
},
error: function (err) {
console.error('Signature generation error: ', err);
}
});
});