Options
All
  • Public
  • Public/Protected
  • All
Menu

The UserController class is a managing class to control the meeting user related functions and states in an active meeting, such as admitting or denying the participants who are in the waiting room and assigning moderators, etc.

Hierarchy

  • UserEventEmitter
    • UserController

Index

Constructors

Events

Methods

  • Admits all currently in the waiting room users to join the meeting.

    description

    A successful call of admitAll triggers the UserEvent.USER_JOINED event for remote user.

    description

    Only the meeting host or moderator has permission to invoke this method.

    Returns Promise<ErrorCodeType>

    0 means the action succeeds or fails otherwise

  • Admits all currently in the waiting room users to join the meeting.

    description

    A successful call of admitUser triggers the UserEvent.USER_JOINED event for remote user.

    description

    Only the meeting host or moderator has permission to invoke this method.

    Parameters

    • uid: string

      The unique id of the user

    Returns Promise<ErrorCodeType>

    0 means the action succeeds or fails otherwise

  • Assigns the moderator role to the meeting user(s).

    description

    A successful call of assignModerators triggers the UserEvent.USER_ROLE_CHANGED event callback for all meeting users.

    description

    Only the meeting host or moderator has permission to invoke this method.

    Parameters

    • uids: string[]

      The user id list, one user id at least must be provided

    Returns Promise<ErrorCodeType>

    0 means the action succeeds or fails otherwise

  • callOut(countryCode: number, phone: string): Promise<string>
  • Invite by phone number

    Parameters

    • countryCode: number
    • phone: string

      Phone number, should be pure number format string

    Returns Promise<string>

    id The id of the dial, used for hangup

  • Hangup the dial by id

    Parameters

    • id: string

      The id of the callout

    Returns Promise<ErrorCodeType>

    0 means the action succeeds or fails otherwise

  • Denies a specific waiting room user to join the meeting.

    description

    Only the meeting host or moderator has permission to invoke this method.

    Parameters

    • uid: string

      The unique id of the user

    Returns Promise<ErrorCodeType>

    0 means the action succeeds or fails otherwise

  • getActiveVideoUser(): Pick<IParticipant, "uid" | "displayName" | "status" | "isMe" | "isHost" | "isModerator" | "isVideoMuted" | "isAudioMuted" | "isSpeaking" | "isScreenSharing" | "isDeleted" | "isAudioJoined" | "joinTime" | "getHeadshotUrl" | "getHeadshotUrlWithSize">
  • Gets the current active video user of an active meeting.

    Returns Pick<IParticipant, "uid" | "displayName" | "status" | "isMe" | "isHost" | "isModerator" | "isVideoMuted" | "isAudioMuted" | "isSpeaking" | "isScreenSharing" | "isDeleted" | "isAudioJoined" | "joinTime" | "getHeadshotUrl" | "getHeadshotUrlWithSize">

    The local user object

  • getMeetingUserById(uid: string): undefined | Pick<IParticipant, "uid" | "displayName" | "status" | "isMe" | "isHost" | "isModerator" | "isVideoMuted" | "isAudioMuted" | "isSpeaking" | "isScreenSharing" | "isDeleted" | "isAudioJoined" | "joinTime" | "getHeadshotUrl" | "getHeadshotUrlWithSize">
  • Gets a specific meeting user object.

    Parameters

    • uid: string

      The unique id of the meeting user

    Returns undefined | Pick<IParticipant, "uid" | "displayName" | "status" | "isMe" | "isHost" | "isModerator" | "isVideoMuted" | "isAudioMuted" | "isSpeaking" | "isScreenSharing" | "isDeleted" | "isAudioJoined" | "joinTime" | "getHeadshotUrl" | "getHeadshotUrlWithSize">

    The user object or undefined otherwise

  • getMeetingUsers(): Record<string, Pick<IParticipant, "uid" | "displayName" | "status" | "isMe" | "isHost" | "isModerator" | "isVideoMuted" | "isAudioMuted" | "isSpeaking" | "isScreenSharing" | "isDeleted" | "isAudioJoined" | "joinTime" | "getHeadshotUrl" | "getHeadshotUrlWithSize">>
  • Gets all meeting user object map.

    description

    The local user object is also included in the map

    Returns Record<string, Pick<IParticipant, "uid" | "displayName" | "status" | "isMe" | "isHost" | "isModerator" | "isVideoMuted" | "isAudioMuted" | "isSpeaking" | "isScreenSharing" | "isDeleted" | "isAudioJoined" | "joinTime" | "getHeadshotUrl" | "getHeadshotUrlWithSize">>

    The user object map or empty otherwise

  • getMyself(): Pick<IParticipant, "uid" | "displayName" | "status" | "isMe" | "isHost" | "isModerator" | "isVideoMuted" | "isAudioMuted" | "isSpeaking" | "isScreenSharing" | "isDeleted" | "isAudioJoined" | "joinTime" | "getHeadshotUrl" | "getHeadshotUrlWithSize">
  • Gets the local user object.

    Returns Pick<IParticipant, "uid" | "displayName" | "status" | "isMe" | "isHost" | "isModerator" | "isVideoMuted" | "isAudioMuted" | "isSpeaking" | "isScreenSharing" | "isDeleted" | "isAudioJoined" | "joinTime" | "getHeadshotUrl" | "getHeadshotUrlWithSize">

    The local user object

  • isCalloutAllowed(): boolean
  • Indicates whether the participant in the conference has permission to callout.

    Returns boolean

    True means has permission or otherwise

  • Removes the specified listener from the listener array for the event named eventName.

    Parameters

    Returns void

  • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

    Parameters

    Returns void

  • Moves a specific meeting user into the waiting room.

    description

    A successful call of putUserInWaitingRoom triggers the UserEvent.USER_LEFT event callback for that specific user.

    description

    Only the meeting host or moderator has permission to invoke this method.

    Parameters

    • uid: string

      The unique id of the meeting user

    Returns Promise<ErrorCodeType>

    0 means the action succeeds or fails otherwise

  • Removes a specific meeting user from an active meeting.

    description

    A successful call of removeUser triggers the UserEvent.USER_LEFT event notification for remote users.

    description

    Only the meeting host or moderator has permission to invoke this method.

    Parameters

    • uid: string

      The unique id of the meeting user

    Returns Promise<ErrorCodeType>

    0 means the action succeeds or fails otherwise

  • Revokes the moderator role from the meeting user(s).

    description

    A successful call of revokeModerators triggers the UserEvent.USER_ROLE_CHANGED event callback for all meeting users.

    description

    Only the meeting host or moderator has permission to invoke this method.

    Parameters

    • uids: string[]

      The user id list, one user id at least must be provided

    Returns Promise<ErrorCodeType>

    0 means the action succeeds or fails otherwise