Description
I’m experiencing the same issue as this post, where after generateSignature() is called and returns a signature, init() runs but calls neither success() nor error(); nothing happens.
Error
There is no error that outputs. When I set debug: true in the init config object, this prints in the console:
audioPanelAlwaysOpen: false
debug: true
disableCallOut: false
disableInvite: false
disableJoinAudio: undefined
disableRecord: false
leaveUrl: "http://localhost:3000/dossier"
showMeetingHeader: true
Which version?
1.7.0
All on latest Firefox and Chrome versions
Code
Since this is proprietary software, I can’t post the full source code, but can post snippets. I’m working in a react application and in my index file, I do the following:
import '@zoomus/websdk/dist/css/bootstrap.css';
import '@zoomus/websdk/dist/css/react-select.css';
import { ZoomMtg } from '@zoomus/websdk';
Here’s the code I define in a class elsewhere
generateSignature = () => {
return new Promise((resolve, reject) => {
ZoomMtg.generateSignature({
meetingNumber: xxxxxxxxxx, // normally an int of the meeting ID
apiKey: zoomSdkLaunchKey(),
apiSecret: zoomSdkLaunchSecretKey(),
role: 0,
success(res) {
resolve(res.result);
},
error(err) {
reject(err);
}
});
});
}
initMeeting = (signature) => {
return new Promise((resolve, reject) => {
ZoomMtg.init({
debug: true,
leaveUrl: 'http://localhost:3000/post-meeting-page',
isSupportAV: true,
success() {
resolve(signature);
},
error(res) {
reject(res);
}
});
});
};
joinMeeting = (signature) => {
return new Promise((resolve, reject) => {
ZoomMtg.join(
{
meetingNumber: xxxxxxxxxx,
userName: 'John',
signature,
apiKey: zoomSdkLaunchKey(),
userEmail: 'john@example.com',
success() {
resolve();
},
error(res) {
reject(res);
}
}
);
});
}
I call those methods via the following:
zoomService.generateSignature()
.then(res => zoomService.initMeeting(res))
.then(res => zoomService.joinMeeting(res))
.then(res => {
$('#zmmtg-root').show();
}).catch(err => {
console.log(err);
});
The reason for that last $('#zmmtg-root').show();
is because I hide it in index.js initially:
$("#zmmtg-root").hide();
Just so the rest of the rendered UI can be visible.
Additional notes
I’ve tried my API key/secret in the sample app and used a valid meeting ID and it did launch the client successfully. I’m stumped as to why this isn’t working. I didn’t include any additional tags or ones in my index.html file; I simply following the guide by including an import { ZoomMtg } from '@zoomus/websdk';
at index.js
Assistance would be greatly appreciated.