Description
Error
I’m getting the following error while joining a session using join
method.
index.umd.js?af5c:formatted:3635 Uncaught TypeError: Cannot read property ‘readyState’ of null
at a (index.umd.js?af5c:formatted:3635)
at XMLHttpRequest.xhr.onprogress.xhr.onload (offline.js?abd9:86)
Which Web Video SDK version?
@zoom1234/videosdk - 1.1.0
Screenshots
Device (please complete the following information):
- OS: MacOS
Additional context
This is the code:
const zmClient = ZoomVideo.createClient();
useEffect(() => {
init();
return () => {
ZoomVideo.destroyClient();
};
}, []);
const init = () => {
console.log('Initialziing session...');
zmClient.init('en-US', `${window.location.origin}/codepair-assets/lib`).then(() => {
const signature = generateVideoToken(creds.sdkKey, creds.sdkSecret, slug);
join(signature, slug, name)
})
.catch(e => {
console.log(e, 'Initialziing error');
});
};
const join = (signature: string, topic: string, username: string) => {
console.log('Joining the session...');
console.log(topic, signature, username);
zmClient.join(topic, signature, 'username').then((data) => {
console.log(data)
// if (!mediaStream) setMediaStream(zmClient.getMediaStream());
console.log(mediaStream)
})
.catch((e) => {
console.log(e, 'Joining error');
});
}