Determine if local user is joining the session on onUserJoin

onUserJoin userArray gives list of all the users. Is there a way to determine if the user who just joined is the local user? In onSessionJoin, getRemoteUser() is always nil although there are already users in the session.

Hi @sp.nu,

You can use client.getCurrentUserInfo().userId.

const client = ZoomVideo.createClient();
client.on("user-added", (e)=>{
  const isLocal = e[0].userId === client.getCurrentUserInfo().userId
  
})

@ekaansh.zoom : Thank you. I am assuming iOS version works the same way.

Yes, it works the same way.

1 Like