Options
All
  • Public
  • Public/Protected
  • All
Menu

The video client is the core of the Video SDK.

Index

Functions

changeName

  • Renames your name or another user's name.

    • Only the host or manager can rename others.
    • The host can set whether the user is allowed to rename themselves. See client.isAllowToRename() to get the value.

    Parameters

    • name: string

      New display name.

    • Optional userId: number

      User ID of the user to rename.

    Returns ExecutedResult

getAllUser

  • Get the in session users of the session.

    Returns Participant[]

getChatClient

getCommandClient

getCurrentUserInfo

getLiveTranscriptionClient

getMediaStream

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

    This usually the first step of using media.

    Returns typeof Stream

getRecordingClient

getSessionHost

  • Gets the host of the session.

    Returns Participant | undefined

getSessionInfo

  • getSessionInfo(): SessionInfo
  • Gets the current session’s information.

    Returns SessionInfo

getSubsessionClient

getUser

  • Gets the user by user ID.

    Parameters

    • userId: number

    Returns Participant | undefined

init

  • Initialize the Zoom Video SDK before join a session. The Zoom Video SDK uses an SDK key & secret for authentication.

    Parameters

    • language: string

      The language of the Video SDK. The default is en-US.

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

      In the Zoom Video SDK, web workers and web assembly are used to process the 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/videosdk/{version}/lib/
      • CDN: The dependent assets path will be https://dmogdx0jrul3u.cloudfront.net/videosdk/{version}/lib/
      • CN: Only applicable for China. The dependent assets path will be https://jssdk.zoomus.cn/videosdk/{version}/lib
      • {FULL_ASSETS_PATH}: The SDK will load the dependent assets specified by the developer.
    • Optional options: InitOptions

      Optional additional options for initialization.

    Returns ExecutedResult

isHost

  • isHost(): boolean
  • Determines whether the current user is the host.

    Returns boolean

isManager

  • isManager(): boolean
  • Determines whether the current user is a manager.

    Returns boolean

join

  • join(topic: string, token: string, userName: string, password?: string, sessionIdleTimeoutMins?: number): ExecutedResult
  • Join the session

    • Make sure to call the init method before joining.

    Parameters

    • topic: string
    • token: string

      A JWT, should be generated on server.

    • userName: string

      User name.

    • Optional password: string

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

    • Optional sessionIdleTimeoutMins: number

      Idle timeout to end the session.

    Returns ExecutedResult

    an executed promise. Following are the possible error reasons:

    • duplicated operation: Duplicated invoking of the join method.
    • invalid apiKey/sdkKey or signature: API key, SDK key, or signature is not correct.
    • invalid password: Password is not correct.
    • invalid parameters: Can not join the session because of invalid parameters.
    • internal error: Internal error.

leave

  • Leaves or ends the session.

    Parameters

    • Optional end: boolean

      Optional. Default is false. If true, the session ends. Only the host has the privilege to do this.

    Returns ExecutedResult

makeHost

  • Makes other participant the host.

    • Only the host can make someone else the host.
    • There is only one host in a session. Once the host makes another user the host, the original host will no longer be the host.

    Parameters

    • userId: number

    Returns ExecutedResult

makeManager

  • Makes another participant a manager.

    • Only the host can make others into managers.
    • 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

removeUser

  • Removes the participant.

    • Only the host or manager can remove others.

    Parameters

    • userId: number

    Returns ExecutedResult

revokeManager

  • Revokes the manager permission from the participant.

    • Only the host can revoke manager permissions.

    Parameters

    • userId: number

    Returns ExecutedResult