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

  • Download the file The file cannot be downloaded directly from the file URL as it is encrypted. To download the file, use this method. It may take some time to decrypt and download the file. However, you have the option to cancel the download process by invoking the returned method at any time.

    Parameters

    • id: string

      The msg id of the record containing file info.

    • fileUrl: string

      file URL

    • Optional blob: boolean

      Optional default is false. Determine whether to provide raw data in blob format instead of directly downloading the file. This is useful for displaying images in chat records.

    Returns Promise<FileTransferCancelFunction | Error>

  • Gets the chat list history.

    Example

    const historyChatList = chat.getHistory();
    

    Returns ChatMessage[]

  • Gets the list of available chat receivers.

    Returns ChatUserItem[]

  • isFileTransferEnabled(): boolean
  • Whether file transfer in meeting chat is enabled

    Returns boolean

  • 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.
  • Send file The file will be securely encrypted and then uploaded to Zoom's file server. It may take some time to encrypt and upload the file. However, you have the option to cancel the upload process by invoking the returned method at any time.

    Parameters

    • file: string | File

      file or retryToken

    • userId: number

    Returns Promise<FileTransferCancelFunction | Error>

  • Sends a chat message to all participants.

    Parameters

    • text: string

      Message to send.

    Returns Promise<ChatMessage | Error>

    ExecutedPromise

  • 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