Join a room using session ID

Hi, i’m using the Video SDK Web, i just noticed that it will generate more than 1 video if i left the room and rejoined the room again with the same topic and password, my question is : is it possible that if i rejoin the same video/ room using the same topic, password or session id even i just leave the room?

please help me, many thanks in advance!

Hi @it.apps2 ,

Within your code, are you calling the leave method on your client (client.leave()) when you exit the session?

Thanks,
Rehema

Hi Rehema,

Yes, i am using (client.leave( )) method when leave the room. so it was the problem ?
is there any other options for leaving the room without end the session ?

many thanks for your help

Hi @it.apps2 ,

Calling the client will not automatically end the session, unless you are host and pass in the parameter end: true. So, your session is not ended when you leave.

Thanks,
Rehema

Hi @rehema.zoom,
yup, i already using client.leave( ) method without passing any parameter(empty) when i leave the room, but when i tried to rejoin the room again using the same topic it will generate new session id again( it got more than 1 session id with the same topic when i checked the recordings cloud result). do you have any solutions for this ?

thanks in advance!.

Hey @it.apps2

Topics are reusable.

When a session with the same topic is in progress, it will join that session; otherwise, a new session will be created.

The situation you mentioned may occur when the client.leave is called and it’s the last user in the session. The next time a session with the same topic is joined, a new session will be created, resulting in a new session ID.

Thanks
Vic