Access in-meeting user information

View as Markdown

After joining a meeting, access information for each meeting participant through MobileRTCMeetingService and MobileRTCMeetingServiceDelegate.

Use one of several different IDs, each serving its own purpose, to access user information.

  • Customer key - A developer-supplied identifier that may be passed in through the MeetingOptions instance used to join a meeting.
  • User ID - A nonpersistent, unique per-user identifier assigned by Zoom for the current meeting. If a user leaves and rejoins the same meeting, they get a new user ID assigned each time they join. This is also reassigned when switching between the main meeting and breakout rooms.
  • Persistent ID - A per-user identifier assigned by Zoom for the current meeting and all submeetings, such as breakout rooms. This per-user identifier will not be reassigned in the same meeting or submeeting, but users in different meetings may have the same ID value.
  • Participant ID - A unique per-user identifier assigned by Zoom to a user's account. This persists across all meetings for an account. You can't access this ID through the iOS SDK, but can retrieve it through the REST API.

When a user joins a meeting, get their InMeetingUserInfo object.

guard let meetingService = MobileRTC.shared().getMeetingService() else { return }
meetingService.delegate = self

extension ViewController: MobileRTCMeetingServiceDelegate {
    func onSinkMeetingUserJoin(_ userID: UInt) {
        guard let meetingService = MobileRTC.shared().getMeetingService() else { return }
        guard let userInfo = meetingService.userInfo(byID: userID) else { return }
    }
}

Use the InMeetingUserInfo to access data specific to that user.

Get the customer key.

userInfo.customerKey

Get the user's avatar picture path, if available.

userInfo.avatarPath

Get the user ID.

userInfo.userID

Get the username.

userInfo.userName

Get the persistent ID.

userInfo.persistentId

Each user in a meeting or webinar has a role assigned to one of these values.

  • MobileRTCUserRole_None - No role has been assigned.
  • MobileRTCUserRole_Host - The host of the current meeting or webinar.
  • MobileRTCUserRole_CoHost - A co-host of the current meeting or webinar.
  • MobileRTCUserRole_Panelist - A panelist in the current meeting or webinar.
  • MobileRTCUserRole_BreakoutRoom_Moderator - The breakout room moderator.
  • MobileRTCUserRole_Attendee - An attendee of the current meeting or webinar.

Get the user's role in the current meeting.

userInfo.userRole

Determine whether a given user is the current user.

userInfo.isMySelf