Video SDK Issue on web

We are facing an issue while using Video SDK on Web version 1.6.0.
If a participant is suddenly disconnected due to some issue & when returning to the session, the system does not update the camera image it got stuck.

It is giving us below error in below handle.
{
“type”: “INVALID_OPERATION”,
“reason”: “subscribe video counts greater than maximum size (1)”
}

It works if reloading the browser and join again. But If participant simply click browser back button and join session again it gives above error to another user in below event

const onPeerVideoStateChange = useCallback(async (payload: any) => {
console.log(“peer-video-state-change”, payload);
if (payload.action === “Start”) {
await mediaStream.current?.renderVideo(
elements.patientCanvas(),
payload.userId,
mainViewWidth,
mainViewHeight,
0,
0,
2
);
updateVideoState({ isPatientVideoOn: true });
} else if (payload.action === “Stop”) {
await stopPatientVideo();
}
}, );

Hey @pooja.emedstore

Thanks for your feedback.

Have you enabled SharedArrayBuffer on your site?

If not, we cannot render more than 1 video on the same canvas, which means you need to assign a canvas for each video.

Thanks
Vic

@vic.yang

Thank you for your response.

we are not trying to render more than one video on single canvas. Its just start & stop rendering for the same participant.

It is working absolutely fine when participant manually starts & stops the video mode but when he leaves the session and rejoins, then turn on video, that is where the other user gets the given error when rendering.

Hey @pooja.emedstore

Each user who joins the session will be automatically assigned a userId, which is also applicable to the scenario of leaving and rejoining the session.

So a new canvas is required or if you need to reuse the same canvas, invoke the stopRenderVideo to clear the previous rendered before using renderVideo to render the new video.

Thanks
Vic

Hello @vic.yang

We are exactly doing the same thing but somehow its not working. Will try few other things & let you know if it works.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.