Options
All
  • Public
  • Public/Protected
  • All
Menu

After joining a session, call client.getChatClient() to get the chat client.

const chat = client.getChatClient()

Index

Functions

getHistory

  • Gets the chat list history.

    Example

    const historyChatList = chat.getHistory();
    

    Returns ChatMessage[]

getPrivilege

getReceivers

  • Gets the list of available chat receivers.

    Returns ChatUserItem[]

send

  • send(text: string, userId: number): Promise<ChatMessage | Error>
  • Sends a chat message to a specific participant.

    Example

     chat.send('test', userId)
    

    Parameters

    • text: string
    • userId: number

    Returns Promise<ChatMessage | Error>

    • ChatMessage: success
    • Error: Failure. Here are the error states and details:
      • IMPROPER_MEETING_STATE: Chat works only when the user is in meeting.
      • INSUFFICIENT_PRIVILEGES: The user does not have the privilege to send the chat.
      • INVALID_PARAMETERS: Issue with the parameter sent.

sendToAll

  • sendToAll(text: string): Promise<ChatMessage | Error>
  • Sends a chat message to all participants.

    Parameters

    • text: string

      Message to send.

    Returns Promise<ChatMessage | Error>

    ExecutedPromise

setPrivilege

  • The host or manager can control chat privileges in the session. The following table shows privilege values and descriptions:

    Value Description
    ChatPrivilege.All The user can chat to everyone.
    ChatPrivilege.NoOne The user can chat to no one.
    ChatPrivilege.EveryonePublicly The user can chat to the host, manager, and everyone.

    Example

    chat.setPrivilege(ChatPrivilege.All)
    

    Parameters

    Returns ExecutedResult

    executedPromise