Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace InstantClient

Index

Functions

changeName

  • changeName(name: string, userId?: undefined | number): ExecutedResult
  • Rename your name or other participant's name

    • Only the host or manager can rename others.
    • The host can set whether the participants are allowed to rename themselves. refer to the client.isAllowToRename() get the value.
    if(client.isAllowToRename()){
     await client.rename([new name]);
    }

    Parameters

    • name: string

      new display name

    • Optional userId: undefined | number

      rename the spcified user

    Returns ExecutedResult

getAllUser

  • Get the in meeting users of the meeting.

    Returns Array<Participant>

getChatClient

  • getChatClient(): typeof ChatClient
  • Get chat client.

    Returns typeof ChatClient

getCurrentUserInfo

getMediaStream

  • getMediaStream(): typeof Stream
  • Get the media stream instance for managing the media.

    This usually the first step of using media.

    Returns typeof Stream

getSessionInfo

getUser

  • Get the user by userId.

    Parameters

    • userId: number

    Returns Participant | undefined

init

  • init(language: string, dependentAssets: string | "CDN" | "Global" | "CN"): ExecutedResult
  • Initilize the ZOOM Instant SDK before join a meeting. The ZOOM Instant SDK uses an SDK key & Secret for authentication. Login to the Zoom Marketplace and Create a JWT App to get SDK keys & Secrets.

    Parameters

    • language: string

      The language of ZOOM Instant Web SDK. Default is en-US

    • dependentAssets: string | "CDN" | "Global" | "CN"

      In the ZOOM Instant SDK, web workers and web assembly are used to process media stream. This part of the code is separated from the SDK, so it is necessary to specify the dependent assets path. When the SDK is released, the web worker and the web assembly will be also included(the lib folder), you can either deploy these assets to your private servers or use the cloud assets provided by ZOOM. The property has following value:

      • Global: The default value. The dependent assets path will be https://source.zoom.us/{version}/lib
      • CDN: The dependent assets path will be https://dmogdx0jrul3u.cloudfront.net/{version}/lib
      • CN: Only applicable for China. The dependent assets path will be https://jssdk.zoomus.cn/{version}/lib
      • {FULL_ASSETS_PATH}: The SDK will load the dependent assets spcified by the developer.

    Returns ExecutedResult

isHost

  • isHost(): boolean
  • Whether current user is host

    Returns boolean

isManager

  • isManager(): boolean
  • Whether current user is manager

    Returns boolean

join

  • join(topic: string, token: string, userName: string, password?: undefined | string): ExecutedResult
  • Join the meeting

    • Make sure call init method before join.

    Parameters

    • topic: string
    • token: string

      A JWT, should be generated on server.

    • userName: string

      user name

    • Optional password: undefined | string

      If a password is required when joining the meeting, pass the password, otherwise omit it

    Returns ExecutedResult

    a executed promise. Following are the possible error reasons:

    • duplicated operation: Duplicated invoke the join method.
    • invalid apiKey or signature: ApiKey or signature is not correct.
    • invalid password: Password is not correct.
    • meeting is not started: The meeting is not started. If you are the host of the meeting, you can start the meeting.
    • meeting is locked: The meeting is locked by the host, can not join the meeting.
    • meeting is at capacity: The meeting is at capacity.
    • meeting is ended: The meeting is already ended.
    • rejected by information barrier: Can not join the meeting because og the information barrier.
    • rejected by existed participant: Can not join the meeting because another client using the account is already in the meeting.
    • invalid parameters: Can not join the meeting because the invalid parameters.
    • rejected by been denied: Can not join the meeting because the host has expeled you.
    • internal error: Internal error.

leave

makeHost

  • Make other participant as the host.

    • Only the host can make host.
    • There is only one host in the meeting. Once make other as the host, the original host is not the meeting host.

    Parameters

    • userId: number

    Returns ExecutedResult

makeManager

  • Make other participants as the manager

    • Only the host can make manager.
    • There may be multiple managers in session.

    Parameters

    • userId: number

    Returns ExecutedResult

off

  • off(event: string, callback: (payload: any) => void): void
  • Remove the event handler.

    Parameters

    • event: string

      event name

    • callback: (payload: any) => void

      the event handler

        • (payload: any): void
        • Parameters

          • payload: any

          Returns void

    Returns void

on

  • on(event: string, callback: (payload: any) => void): void
  • on(event: "connection-change", listener: typeof event_connection_change): void
  • on(event: "user-added", listener: typeof event_user_add): void
  • on(event: "user-updated", listener: typeof event_user_update): void
  • on(event: "user-removed", listener: typeof event_user_remove): void
  • on(event: "video-active-change", listener: typeof event_video_active_change): void
  • on(event: "video-dimension-change", listener: typeof event_video_dimension_change): void
  • on(event: "active-speaker", listener: typeof event_audio_active_speaker): void
  • on(event: "unmute-audio-consent", listener: typeof event_audio_unmute_consent): void
  • on(event: "current-audio-change", listener: typeof event_current_audio_change): void
  • on(event: "chat-receive-message", listener: typeof event_chat_received_message): void
  • on(event: "chat-privilege-change", listener: typeof event_chat_privilege_change): void
  • on(event: "auto-play-audio-failed", listener: typeof event_auto_play_audio_failed): void
  • on(event: "device-change", listener: typeof event_device_change): void
  • on(event: "active-share-change", listener: typeof event_active_share_change): void
  • on(event: "share-content-dimension-change", listener: typeof event_share_content_dimension_change): void
  • on(event: "share-privilege-change", listener: typeof event_share_privilege_change): void
  • on(event: "passively-stop-share", listener: typeof event_passively_stop_share): void
  • on(event: "share-content-change", listener: typeof event_share_content_change): void
  • Listen for the events and handle them.

    Parameters

    • event: string

      event name

    • callback: (payload: any) => void

      the event handler

        • (payload: any): void
        • Parameters

          • payload: any

          Returns void

    Returns void

  • Parameters

    Returns void

  • Parameters

    • event: "user-added"
    • listener: typeof event_user_add

      Details in event_user_add.

    Returns void

  • Parameters

    • event: "user-updated"
    • listener: typeof event_user_update

      Details in event_user_update.

    Returns void

  • Parameters

    • event: "user-removed"
    • listener: typeof event_user_remove

      Details in event_user_remove.

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

removeUser

  • Remove the participant

    • Only the host or manager can remove others.

    Parameters

    • userId: number

    Returns ExecutedResult

revokeManager

  • Revoke the manager permission from the participant

    • Only the host can revoke Manager.

    Parameters

    • userId: number

    Returns ExecutedResult

Generated using TypeDoc