Hi Tommy,
I would like to extend the question.
Yes, indeed we do have
ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();
lines in our code, exactly as it states in the Example App. Yet, it’s working for us in the example app and not working when we try to integrate this in our javascript.
Trying to investigate the issue more, we notice that in the Example App (both Local and CDN) versions, upon meeting init there is an additional request that is sent by the browser and looks like:
https://zoom.us/api/v1/wc/info?callback=localJsonpCallback&meetingNumber={{my-meeting-number}}&userName=WebSDK1.7.2%23CDN&passWord=&signature={{my-generated-signature}}&apiKey={{my-api-key}}&lang=en-US&userEmail=email%40gmail.com&cv=1.7.2&proxy=1&rwc=&_=1585078266958
Only if this request is successful, the meeting starts.
BUT, this request does not happen when I try to run exactly SAME code from my app.
I copy MY javascript below (we use the CDN version, and I do connect all the scripts).
(function(){
console.log('checkSystemRequirements');
console.log(JSON.stringify(ZoomMtg.checkSystemRequirements()));
// it's option if you want to change the WebSDK dependency link resources. setZoomJSLib must be run at first
// if (!china) ZoomMtg.setZoomJSLib('https://source.zoom.us/1.7.2/lib', '/av'); // CDN version default
// else ZoomMtg.setZoomJSLib('https://jssdk.zoomus.cn/1.7.2/lib', '/av'); // china cdn option
// ZoomMtg.setZoomJSLib('http://localhost:9999/node_modules/@zoomus/websdk/dist/lib', '/av'); // Local version default, Angular Project change to use cdn version
ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();
var API_KEY = 'MY-API-KEY';
/**
* NEVER PUT YOUR ACTUAL API SECRET IN CLIENT SIDE CODE, THIS IS JUST FOR QUICK PROTOTYPING
* The below generateSignature should be done server side as not to expose your api secret in public
* You can find an eaxmple in here: https://marketplace.zoom.us/docs/sdk/native-sdks/Web-Client-SDK/tutorial/generate-signature
*/
var API_SECRET = 'MY-API-SECRET';
document.getElementById('join_meeting').addEventListener('click', function(e){
e.preventDefault();
var meetConfig = {
apiKey: API_KEY,
apiSecret: API_SECRET,
meetingNumber: ACTUAL_MEETING_NUMBER,
userName: 'sample user',
passWord: "",
leaveUrl: "https://zoom.us",
role: 0
};
var signature = ZoomMtg.generateSignature({
meetingNumber: meetConfig.meetingNumber,
apiKey: meetConfig.apiKey,
apiSecret: meetConfig.apiSecret,
role: meetConfig.role,
success: function(res){
console.log(res.result);
}
});
ZoomMtg.init({
leaveUrl: 'http://www.zoom.us',
isSupportAV: true,
success: function () {
ZoomMtg.join(
{
meetingNumber: meetConfig.meetingNumber,
userName: meetConfig.userName,
signature: signature,
apiKey: meetConfig.apiKey,
userEmail: 'email@gmail.com',
passWord: meetConfig.passWord,
success: function(res){
$('#nav-tool').hide();
console.log('join meeting success');
},
error: function(res) {
console.log(res);
}
}
);
},
error: function(res) {
console.log(res);
}
});
});
})();
Please help, we’ve already spent hours on this issue, this is really crucial for us to get this working!