hello im using @zoom/videosdk 1.10.8 for my project. I’ve started integrating from sample app and documentation, and i have not been able to render video of connecting participant. My code is like below
const onUserUpdated = useCallback(async (payload :Array<any>) => {
payload.forEach(async d => {
console.log("d", d)
if(d.bVideoOn && d.userId !== zmClient.getSessionInfo().userId){
console.log("rendering d", d)
await mediaStream?.startVideo();
await mediaStream?.renderVideo(document.querySelector('#self-video') as HTMLCanvasElement,
d.userId, 960, 540, 960, 540, 3);
}
else if(d.bVideoOn === false && d.userId !== zmClient.getSessionInfo().userId){
await mediaStream?.stopRenderVideo(document.querySelector('#self-video') as HTMLCanvasElement,
d.userId
);
}
});
}, [zmClient]);
useEffect(() => {
zmClient.on('connection-change', onConnectionChange);
zmClient.on('media-sdk-change', onMediaSDKChange);
// zmClient.on('peer-video-state-change', onPeerVideoStateChange)
zmClient.on('user-updated', onUserUpdated)
return () => {
zmClient.off('connection-change', onConnectionChange);
zmClient.off('media-sdk-change', onMediaSDKChange);
zmClient.off('user-updated', onUserUpdated)
// zmClient.off('peer-video-state-change', onPeerVideoStateChange);
};
and my canvas is
the thing is, second connecting user can see the first user, but first user cant see second user.
if its easier i can try to integrate videosdk-uikit too but i dont know what im doing wrong with this.