I’ve been getting this error sometimes trying to build off the default Video SDK sample project you guys provide. It’s happening during code that looks similar to this:
subscribedVideos.forEach(async (userId) => {
await mediaStream?.renderVideo(
videoRef.current as HTMLCanvasElement,
userId,
width,
height,
x,
y,
quality,
);
}
});
But all the userId’s are valid and show up if i do a:
zmClient.getAllUser()
It would be great if the error explained a bit more or if I can figure out why this is happening.
EDIT:
specifically it’s coming from here in the useRenderVideo file:
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;
await mediaStream?.renderVideo(
videoRef.current as HTMLCanvasElement,
userId,
width,
height,
x,
y,
quality,
);
}
});
some background: i’ve been working for days now trying to get video and video-single to switch together in a button toggle… it’s a requirement for my client and i’m struggling.
i pretty much have mixed both file codes together into one file pretty successfully but it runs into this error that isn’t making any sense to me. i feel like if the error gave more detail on why that’s happening when it’s trying to render valid userIds… i can maybe solve it. i can’t even click the line of code because the code is minified.