In gallery mode (video component)… there are times where someone’s video doesn’t get rendered. It’s very hit or miss and random… it does seem to happen more often after someone shares their screen.
We’re using mostly the default code. Is there any advice on what I can do to prevent this from happening? We really want to use this for our production site but it’s been buggy in that aspect despite the code below and the screen shots showing that it is indeed rendering each user.
useEffect(() => {
if (
// previousIsVideoDecodeReady === false &&
isVideoDecodeReady === true &&
subscribedVideos.length > 0
) {
console.group("client all users");
zmClient.getAllUser().forEach((user) => {
console.log(user);
})
console.groupEnd();
subscribedVideos.forEach(async (userId) => {
const index = participants.findIndex((user) => user.userId === userId);
const cellDimension = layout[index];
if (cellDimension &&(!isSkipSelfVideo ||(isSkipSelfVideo&&userId!==currentUserId))) {
const { width, height, x, y, quality } = cellDimension;
console.log("3333", userId, width, height, x, y);
await mediaStream?.renderVideo(
videoRef.current as HTMLCanvasElement,
userId,
width,
height,
x,
y,
quality,
);
}
});
}
}, [
zmClient,
mediaStream,
videoRef,
layout,
participants,
subscribedVideos,
isVideoDecodeReady,
previousIsVideoDecodeReady,
isSkipSelfVideo,
currentUserId,
]);