Hi, I’m trying to integrate the web sdk (1.7.8) and I have a number of issues and questions.
- When I clear my browser cache (chrome) and then I try to join a meeting using the code below I sometimes get javascript errors on the first page load. This error seems to occur more often when I load the zoom files from the chinese CDN (slower downloading). And it also happens more often if the browser dev tools are open (with ‘Disable cache’ enabled in case that matters). If I then do page refresh I don’t get the errors anymore and the meeting works. What can be done about this?
ReferenceError: JsMediaSDK_Instance is not defined
TypeError: h.a.getCanvasInfo is not a function
TypeError: R.sendSocket is not a function
Uncaught ReferenceError: JsMediaSDK_Instance is not defined
Uncaught TypeError: g.a.connectSocket is not a function
-
As I mentioned I am also testing the same code below but with the files loaded from the chinese CDN (jssdk.zoomus.cn). For some reason the audio does not work at all when the files are loaded from the chinese CDN. Video does work. The audio works correctly when I use the global CDN. What could cause this to happen?
-
What does ‘ZoomMtg.preLoadWasm()’ do exactly? Is this required? Without this code the browsers downloads about 5MB worth of files. I can see that ‘preLoadWasm’ downloads an additional 5MB of ‘.wasm’ files (for a total download size of ± 10MB). But if I leave out ‘preLoadWasm()’ the meeting (audio+video) still works without download those large files.
-
Maybe I’m looking at this wrong but it seems as though the css and javascript files loaded from the CDN’s are sent without any compression (e.g. gzip)? Why is that the case? Because those files would be quite a bit smaller with compression turned on.
<script src="https://source.zoom.us/1.7.8/lib/vendor/react.min.js"></script>
<script src="https://source.zoom.us/1.7.8/lib/vendor/react-dom.min.js"></script>
<script src="https://source.zoom.us/1.7.8/lib/vendor/redux.min.js"></script>
<script src="https://source.zoom.us/1.7.8/lib/vendor/redux-thunk.min.js"></script>
<script src="https://source.zoom.us/1.7.8/lib/vendor/jquery.min.js"></script>
<script src="https://source.zoom.us/1.7.8/lib/vendor/lodash.min.js"></script>
<script src="https://source.zoom.us/zoom-meeting-1.7.8.min.js"></script>
<script>
console.log('check system requirements');
console.log(JSON.stringify(ZoomMtg.checkSystemRequirements()));
ZoomMtg.setZoomJSLib('https://source.zoom.us/1.7.8/lib', '/av');
ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();
</script>
<script>
$(function () {
const meetConfig = {
apiKey: 'abcdef',
meetingNumber: '123456',
passWord: 'pwd789',
leaveUrl: 'https://google.com/',
userName: 'test',
userEmail: '',
role: 0
};
fetch('/api/GenerateSignature', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(meetConfig)
})
.then(result => result.text())
.then(response => {
ZoomMtg.init({
leaveUrl: meetConfig.leaveUrl,
success: function (res) {
console.log('init meeting success');
console.log(res);
ZoomMtg.join({
apiKey: meetConfig.apiKey,
signature: response,
meetingNumber: meetConfig.meetingNumber,
passWord: meetConfig.passWord,
userName: meetConfig.userName,
userEmail: meetConfig.userEmail,
success: function (res) {
console.log('join meeting success');
console.log(res);
},
error(res) {
console.log(res);
}
})
},
error: function (res) {
console.log(res);
}
})
});
})
</script>