LocalAudioTrack and LocalVideoTrack are for testing local media devices.
stream.renderVideo will render videos on the canvas, make sure the first parameter is an HTMLCanvasElement, and Video SDK supports render multiple videos on the same canvas.
In addition please make sure you have set the width and height attributes of the canvas.
Thanks for your response. I already pass HTMLCanvasElement, and set the width and height, even I’ve tried to render all participants video in a single canvas object, there was no error, but no video shown.
Is there any other way to know what is the issue? Or maybe is it possible to get the Mediastream of each participants and render it to video tag
Please do not get the MediaSteam for each participant, and do not render on Video tag. Please confirm again that width and height are attributes of Canvas (canvas.width=1920) not the CSS style( canvas{ width:1920px}).
let stream = zmClient.getMediaStream();
let video = document.getElementById("vrStreamVideo");
let currentUser = zmClient.getCurrentUserInfo();
await stream.renderVideo(video, currentUser.userId, 320, 180, 0, 0, 2);
Looks like a timing issue. We ran into something similar. You need to wait for the person that has turned their video on to actually be sharing their stream. So listen to
Once this is triggered you can then call zoom.getAllUser(). This will give you a list of all the active users.
Then you need to loop through those and look for the user.bVideoOn to be true. Once you have that you can render the video with their user id.
If you do it prematurely then it seems that there is no actual stream (or it give you an empty stream). Then once the data is updated to the real stream you are still listening to the old one because you do not have a mechanism to switch.
Hi Guys, I’ve uploaded the log files hope it will helps, the strange thing is, the current user only send the audio, not the video even when their camera is on
Make sure you have the connection-change event listener as well as the stream.startVideo() function and the stream.renderVideo function. You can see my example below: