Options
All
  • Public
  • Public/Protected
  • All
Menu

Zoom Video SDK for Web - 1.10.8

Index

Namespaces

Enumerations

Classes

Interfaces

Type aliases

Events Audio

Events Camera

Events Chat

Events Command channel

Events Live Stream

Events Live Transcription

Events Media

Events Phone

Events Recording

Events RemoteControl

Events Screen share

Events Session

Events Subsession

Events Video

Functions

Type aliases

ClosedReason: "kicked by host" | "ended by host" | "expeled by host"

Reason for closing the meeting.

  • kicked by host: User kicked off by the host.
  • ended by host: Meeting ended by the host.
  • expeled by host: User expeled by the host.
ErrorTypes: "INVALID_OPERATION" | "INTERNAL_ERROR" | "OPERATION_TIMEOUT" | "INSUFFICIENT_PRIVILEGES" | "IMPROPER_MEETING_STATE" | "INVALID_PARAMETERS" | "OPRATION_LOCKED"

Definition of error types for operations.

  • INVALID_OPERATION: The operation is invalid, perhaps caused by duplicated operations.
  • INTERNAL_ERROR: The remote service is temporarily unavailable.
  • INSUFFICIENT_PRIVILEGES: The operation is only applicable for a host or manager.
  • OPERATION_TIMEOUT: The operation timed out, try again later.
  • IMPROPER_MEETING_STATE: The user is not in a meeting, see the reason for details.
  • closed: The meeting is not joined.
  • on hold: The user is on hold.
  • reconnecting: The meeting is reconnecting.
  • INVALID_PARAMETERS: The parameters passed to the method are invalid, perhaps the wrong user ID or value, see the reason for details.
  • OPERATION_LOCKED: The operation can not be completed because the relevant property is locked, see the reason for details.
ExecutedResult: Promise<"" | ExecutedFailure>

The result of an asynchronous operation. It is a promise object.

  • '': Success
  • ExecutedFailure: Failure. Use .catch(error=>{}) or try{ *your code* }catch(error){} to handle the errors.
FileTransferCancelFunction: () => undefined

Type declaration

    • (): undefined
    • File transfer cancel function

      Returns undefined

LocalCameraControlCmd: Exclude<CameraControlCmd, SwitchCamera>

Local camera control command.

LogLevelDetail: { debug: boolean; error: boolean; info: boolean; log: boolean; print: boolean; warn: boolean }

Log level object

Type declaration

  • debug: boolean

    debug

  • error: boolean

    error

  • info: boolean

    info

  • log: boolean

    log

  • print: boolean

    print

  • warn: boolean

    warn

LogLevelLabel: "debug" | "log" | "info" | "print" | "warn" | "error"

Log level

MaskClip: { x: number; y: number } & MaskShape

Mask clip.

Mask shape.

Audio Events

  • Occurs when some participants in the session are talking.

    client.on('active-speaker', (payload) => {
    console.log(`Active user:`,payload);
    });

    Parameters

    • payload: ActiveSpeaker[]

      Active user.

      • Distinguish activity level by volume, the largest is the first element.

    Returns void

  • event_audio_statistic_data_change(payload: { data: { avg_loss: number; encoding: boolean; jitter: number; max_loss: number; rtt: number; sample_rate: number }; type: "AUDIO_QOS_DATA" }): void
  • Occurs when the audio statistics data is changed; decode (received).

    Parameters

    • payload: { data: { avg_loss: number; encoding: boolean; jitter: number; max_loss: number; rtt: number; sample_rate: number }; type: "AUDIO_QOS_DATA" }

      The event detail.

      • data
      • encoding: If encoding is true, the following metrics stand for the Send data statistics, otherwise, it stands for the Receive data statistics.
      • avg_loss: Audio's average package loss.
      • jitter: Audio's jitter.
      • max_loss: Audio's maximum package loss.
      • rtt: Audio's round trip time.
      • sample_rate: Audio's sample rate.
      • type : String AUDIO_QOS_DATA
      client.on('audio-statistic-data-change', (payload) => {
      console.log('emit', payload);
      });
      • data: { avg_loss: number; encoding: boolean; jitter: number; max_loss: number; rtt: number; sample_rate: number }

        Data

        • avg_loss: number

          Audio's Average package loss.

        • encoding: boolean

          If encoding is true, the following metrics stand for the Send data statistics, otherwise, it stands for the Receive data statistics.

        • jitter: number

          Audio's jitter.

        • max_loss: number

          Audio's maximum package loss.

        • rtt: number

          Audio's round trip time.

        • sample_rate: number

          Audio's sample rate.

      • type: "AUDIO_QOS_DATA"

        Type.

    Returns void

  • event_auto_play_audio_failed(): void
  • Occurs when the SDK tried and failed to auto play audio. This may occur when invoking stream.startAudio() immediately after joining the session.

    client.on('auto-play-audio-failed',()=>{
    console.log('auto play audio failed, waiting user's interaction');
    })

    Returns void

  • Occurs when current audio is changed.

    Parameters

    • payload: { action: AudioChangeAction; source?: MutedSource | LeaveAudioSource; type?: "computer" | "phone" }

      The event detail.

      • Action:
      • join: Join audio. Refer to the type attribute for details.
      • leave: Leave audio.
      • muted: Audio muted, refer to the source attribute for details.
      • unmuted: Audio unmuted, refer to the source attribute for details.
      • Type:
      • `computer': Join by computer audio.
      • phone: Join by phone.
      • Source:
      • active: User active action.
      • passive(mute all): Muted due to the host muting all.
      • passive(mute one): Muted due to the host muting you.
      • passive: Umnuted due to the host unmuting you.
      client.on('current-audio-change', (payload) => {
      if(payload.action==='join'){
      console.log('Joined by ',payload.type);
      }
      });
      • action: AudioChangeAction

        The current audio change action.

      • Optional source?: MutedSource | LeaveAudioSource

        If the action is muted, an extra field to show the muted source.

      • Optional type?: "computer" | "phone"

        Type of audio.

    Returns void

  • event_host_ask_unmute_audio(payload: { reason: "Unmute" }): void
  • Occurs when the host asks you to unmute audio.

    Parameters

    • payload: { reason: "Unmute" }

      The event detail.

      • Reason:
      • Spotlight: Host spotlighted you. If you are muted, you will receive the consent message.
      • Unmute: Host asks you to unmute audio.
      • Allow to talk: You are an attendee of a webinar, the host allowed you to talk.
      client.on('host-ask-unmute-audio', (payload) => {
      console.log(payload.reason);
      });
      • reason: "Unmute"

        The unmute consent reason.

    Returns void

  • event_share_audio_change(payload: { state: "on" | "off" }): void
  • Occurs when the share audio state changes. Usually used to cooperatively change the state of computer audio.

    Parameters

    • payload: { state: "on" | "off" }
      • state: "on" | "off"

        The state of the Chrome browser shared tab audio.

    Returns void

Camera Events

  • event_far_end_camera_capability_change(payload: { ptz: PTZCameraCapability; userId: number }): void
  • Occurs when camera capability changes.

    Parameters

    Returns void

  • event_far_end_camera_in_control_change(payload: { isControlled: boolean; userId?: number }): void
  • Occurs when the camera in control status changes.

    Parameters

    • payload: { isControlled: boolean; userId?: number }

      The event detail.

      • isControlled: boolean

        Is controlled by other user.

      • Optional userId?: number

        User ID.

    Returns void

  • event_far_end_camera_request(payload: { currentControllingDisplayName?: string; currentControllingUserId?: number; displayName: string; userId: number }): void
  • Occurs when the SDK received the far end camera request.

    Parameters

    • payload: { currentControllingDisplayName?: string; currentControllingUserId?: number; displayName: string; userId: number }

      the event detail

      • Optional currentControllingDisplayName?: string

        The display name who is controlling the camera.

      • Optional currentControllingUserId?: number

        The user ID who is controlling the camera.

      • displayName: string

        The display name who requested control.

      • userId: number

        The user ID who requested control.

    Returns void

  • Occurs when the SDK received the far end camera response.

    Parameters

    Returns void

Chat Events

  • event_chat_file_download_progress(payload: { fileBlob?: Blob; fileName: string; fileSize: number; fileUrl: string; id: string; progress: number; senderGuid?: string; senderId: number; status: ChatFileDownloadStatus }): void
  • Occurs when the download file progress changes

    Parameters

    • payload: { fileBlob?: Blob; fileName: string; fileSize: number; fileUrl: string; id: string; progress: number; senderGuid?: string; senderId: number; status: ChatFileDownloadStatus }
      • Optional fileBlob?: Blob

        File Blob, only available when the blob is set to true in the downloadFile method.

      • fileName: string

        File name

      • fileSize: number

        File size

      • fileUrl: string

        File URL

      • id: string

        Message ID

      • progress: number

        Upload progress

      • Optional senderGuid?: string

        Sender user unified ID.

      • senderId: number

        Sender user ID

      • status: ChatFileDownloadStatus

        Upload status

    Returns void

  • event_chat_file_upload_progress(payload: { fileName: string; fileSize: number; progress: number; receiverGuid?: string; receiverId: number; retryToken?: string; status: ChatFileUploadStatus }): void
  • Occurs when the upload file progress has changed

    Parameters

    • payload: { fileName: string; fileSize: number; progress: number; receiverGuid?: string; receiverId: number; retryToken?: string; status: ChatFileUploadStatus }
      • fileName: string

        File name

      • fileSize: number

        File size

      • progress: number

        Upload progress

      • Optional receiverGuid?: string

        Receiver user unified ID.

      • receiverId: number

        Receiver user ID

      • Optional retryToken?: string

        Retry token, can be used for re-sending file.

      • status: ChatFileUploadStatus

        Upload status

    Returns void

  • event_chat_privilege_change(payload: { chatPrivilege: ChatPrivilege }): void
  • Occurs when the host changes the chat privileges.

    Parameters

    • payload: { chatPrivilege: ChatPrivilege }

      The event detail.

      client.on('chat-privilege-change',payload=>{
      console.log(payload.chatPrivilege);
      })

    Returns void

  • event_chat_received_message(payload: ChatMessage): void
  • Occurs when receiving a chat.

    Parameters

    • payload: ChatMessage

      The event details.

      client.on('chat-on-message',payload=>{
      console.log('from %s, message:%s',payload.sender.name,payload.message);
      })

    Returns void

Command channel Events

  • event_command_channel_message(payload: { msgid: string; senderId: string; senderName: string; text: string; timestamp: number }): void
  • Occurs when command channel receives a message.

    Parameters

    • payload: { msgid: string; senderId: string; senderName: string; text: string; timestamp: number }

      The event details.

      client.on('command-channel-message',payload=>{
      console.log('from %s, message:%s',payload.senderId, payload.text, payload.timestamp);
      })
      • msgid: string

        Message ID.

      • senderId: string

        Sender's user ID.

      • senderName: string

        Sender's display name.

      • text: string

        Message content.

      • timestamp: number

        Timestamp.

    Returns void

  • Occurs when the command channel status changes.

    Parameters

    • payload: ConnectionState
      client.on('command-channel-status',payload=>{
      console.log('from %s, message:%s',payload);
      })

    Returns void

Live Stream Events

  • Occurs when live stream status changes.

    Parameters

    Returns void

Live Transcription Events

  • event_caption_enable(payload: boolean): void
  • Occurs if the automatic live transcription enable status changes.

    Parameters

    • payload: boolean

    Returns void

  • event_caption_host_disable(payload: boolean): void
  • Occurs when the host disables caption.

    Parameters

    • payload: boolean

      boolean

    Returns void

  • Occurs when the SDK receives the live transcription, live translation, or manual captions message.

    Parameters

    Returns void

  • event_caption_status(payload: { autoCaption: boolean; lang?: number }): void
  • Occurs when the live transcription status changes.

    Parameters

    • payload: { autoCaption: boolean; lang?: number }

      the event detail

      client.on('caption-status',payload=>{
      console.log(payload);
      })
      • autoCaption: boolean

        Is auto caption enabled.

      • Optional lang?: number

        Language code.

    Returns void

Media Events

  • event_device_change(): void
  • Occurs when adding or removing the microphone, speaker, or camera.

    Returns void

  • event_device_permission_change(payload: { name: "microphone" | "camera"; state: "denied" | "granted" | "prompt" }): void
  • Occurs when the SDK detects that the device permission has changed.

    Parameters

    • payload: { name: "microphone" | "camera"; state: "denied" | "granted" | "prompt" }
      • name: "microphone" | "camera"

        device type

      • state: "denied" | "granted" | "prompt"

        permission state

    Returns void

  • Occurs when the encode or decode state of the media SDK changes.

    Parameters

    Returns void

Phone Events

  • event_dial_out_change(payload: { code: DialoutState }): void
  • Occurs when the dial-out state changes.

    client.on('dialout-state-change', (payload) => {
    console.log(payload.code);
    });

    Parameters

    Returns void

Recording Events

  • event_individual_recording_change(payload: { state: RecordingStatus; userId?: number }): void
  • Occurs when the individual cloud recording status changes.

    • Ask: When the host starts individual cloud recording, ask the user to accept or decline recording.
    • Accept: When the user accepts individual cloud recording.
    • Decline: When the user declines individual cloud recording.

    Parameters

    • payload: { state: RecordingStatus; userId?: number }

      The individual recording status.

      • state: RecordingStatus

        state

      • Optional userId?: number

        The user ID being recorded.

    Returns void

  • Occurs when the cloud recording status changes.

    Parameters

    Returns void

RemoteControl Events

  • event_remote_control_approved_change(payload: { state: ApprovedState }): void
  • Occurs when the controlled user approved or rejected the remote control request

    client.on("remote-control-approved-change", (payload) => {
    if (payload.state === ApprovedState.Approved) {
    stream.startRemoteControl(viewport);
    }else{
    // prompt a dialog to retry
    }
    });

    Parameters

    Returns void

  • event_remote_control_clipboard_change(payload: { content: string; error?: string; x: number; y: number }): void
  • Occurs when the controlling user copies some text during the remote control period.

    copyButtonElement.addEventListener("click", (event) => {
    event.preventDefault();
    // use copy-to-clipboard
    copyToClipboard(copyButtonElement.dataset.dataContent);
    });

    client.on("remote-control-clipboard-change", (payload) => {
    copyButtonElement.style.left = payload.x;
    copyButtonElement.style.top = payload.x;
    copyButtonElement.dataset.dataContent = payload.content;
    });

    Parameters

    • payload: { content: string; error?: string; x: number; y: number }
      • content: string

        Clipboard text content.

      • Optional error?: string

        Error

      • x: number

        Position X where the copy action takes place

      • y: number

        Position y where the copy action takes place

    Returns void

  • event_remote_control_in_control_change(payload: { isControlling: boolean }): void
  • Occurs when the remote sharing user can regain access to control the screen.

    client.on("remote-control-in-control-change", (payload) => {
    if (payload.isControlling) {
    console.log("You are controlling the shared content");
    } else {
    console.log("You lost the control");
    }
    });

    Parameters

    • payload: { isControlling: boolean }
      • isControlling: boolean

        Whether the user is controlling the screen.

    Returns void

  • event_remote_control_request_change(payload: { displayName: string; isSharingEntireScreen: boolean; userId: number }): void
  • Occurs when the controlled user receives the remote control request

    Parameters

    • payload: { displayName: string; isSharingEntireScreen: boolean; userId: number }
      • displayName: string

        The user's display name.

      • isSharingEntireScreen: boolean

        Whether the user is sharing entire screen.

      • userId: number

        The user's ID.

    Returns void

Screen share Events

  • event_active_share_change(payload: { state: "Active" | "Inactive"; userId: number }): void
  • Occurs when some participant starts screen sharing.

    client.on('active-share-change',payload=>{
    if(payload.state==='Active'){
    stream.startShareView(canvas,payload.userId);
    }else if(payload.state==='Inactive'){
    stream.stopShareView();
    }
    })

    Parameters

    • payload: { state: "Active" | "Inactive"; userId: number }
      • state: "Active" | "Inactive"

        Sharing state.

      • userId: number

        User ID of active share.

    Returns void

  • event_peer_share_state_change(payload: { action: "Start" | "Stop"; userId: number }): void
  • Occurs when some participant starts or stops screen sharing.

    client.on('peer-share-state-change',payload=>{
    if(payload.action==='Start'){
    console.log(`user:${payload.userId} starts share`);
    }else if(payload.action==='Stop'){
    console.log(`user:${payload.userId} stops share`);
    }
    })

    Parameters

    • payload: { action: "Start" | "Stop"; userId: number }
      • action: "Start" | "Stop"

        Peer share action.

      • userId: number

        User ID.

    Returns void

  • event_share_can_see_screen(): void
  • Occurs when the requestReadReceipt option is true in the startShareScreen method. The sharer can receive the event if someone can see the shared screen.

    Returns void

  • event_share_content_change(payload: { userId: number }): void
  • Occurs when received shared content automatically changes.

    • For example, if the host start new sharing, received shared content will be automatically changed.

    Parameters

    • payload: { userId: number }
      • userId: number

        User ID currently receiving sharing.

    Returns void

  • event_share_content_dimension_change(payload: { height: number; type: "received" | "sended"; width: number }): void
  • Occurs when shared content dimensions change.

    client.on('share-content-dimension-change',payload=>{
    viewportElement.style.width = `${payload.width}px`;
    viewportElement.style.height = `${payload.height}px`;
    })

    Parameters

    • payload: { height: number; type: "received" | "sended"; width: number }
      • height: number

        Height.

      • type: "received" | "sended"

        Values: sended: current share; received: others' share.

      • width: number

        Width.

    Returns void

  • event_share_privilege_change(payload: { privilege: SharePrivilege }): void
  • Occurs when the host changes the share privileges.

    Parameters

    Returns void

  • event_share_statistic_data_change(payload: { data: { avg_loss: number; encoding: boolean; fps: number; height: number; jitter: number; max_loss: number; rtt: number; sample_rate: number; width: number } }): void
  • Occurs when the share statistics data is changed during decoding (received) or encoding (sent)

    Parameters

    • payload: { data: { avg_loss: number; encoding: boolean; fps: number; height: number; jitter: number; max_loss: number; rtt: number; sample_rate: number; width: number } }

      the event detail

      • data
      • encoding: If encoding is true, the following metrics stand for the Send data statistics, otherwise, it stands for the Receive data statistics.
      • avg_loss: average package loss for video
      • jitter: jitter for video
      • max_loss: max package loss for video
      • rtt: round trip time for video
      • sample_rate: sample rate video
      • width: width for video
      • height: height for video
      • fps: Frames per second (FPS) for video
      • type : string "VIDEOSHARE_QOS_DATA"
      client.on('share_statistic_data_change', (payload) => {
      console.log('emit', payload);
      });
      • data: { avg_loss: number; encoding: boolean; fps: number; height: number; jitter: number; max_loss: number; rtt: number; sample_rate: number; width: number }

        Quality of Service (QoS) data.

        • avg_loss: number

          Share's average package loss. (On Safari or Firefox, this value is always 0)

        • encoding: boolean

          If encoding is true, the following metrics stand for the Send data statistics, otherwise, it stands for the Receive data statistics.

        • fps: number

          Share's frame rate in frames per second (FPS).

        • height: number

          Share's resolution height.

        • jitter: number

          Share's jitter. (On Safari or Firefox, this value is always 0)

        • max_loss: number

          Share's maximum package loss. (On Safari or Firefox, this value is always 0)

        • rtt: number

          Share's round trip time. (On Safari or Firefox, this value is always 0)

        • sample_rate: number

          Share's sample rate. (On Safari or Firefox, this value is always 0)

        • width: number

          Share's resolution width.

    Returns void

Session Events

  • Occurs when a new participant joins the session.

    client.on('user-added',(payload)=>{
    // You can refresh the participants when
    const participants = client.getParticipantsList();
    })

    Parameters

    Returns void

Subsession Events

  • event_bo_ask_for_help(payload: { displayName: string; subsessionId: string; subsessionName: string; userId: number }): void
  • Occurs when the host receives a request for help from a user in a subsession.

    Parameters

    • payload: { displayName: string; subsessionId: string; subsessionName: string; userId: number }
      • displayName: string

        User's display name.

      • subsessionId: string

        Subsession ID.

      • subsessionName: string

        Subsession name.

      • userId: number

        User ID of the user who requested help.

    Returns void

  • Occurs when the attendee received the response for the request for help.

    Parameters

    Returns void

  • event_bo_broadcast_message(payload: { message: string }): void
  • Occurs when the host broadcasts content to all in the subsession.

    Parameters

    • payload: { message: string }
      • message: string

        Broadcast message.

    Returns void

  • event_bo_closing_room_countdown(payload: { countdown: number }): void
  • Occurs when there is a buffer countdown when the subsession is about to be closed. This event will be triggered every second until the countdown is over.

    Parameters

    • payload: { countdown: number }
      • Countdown: seconds remaining.
      • countdown: number

        Countdown for closing the subsession.

    Returns void

  • event_bo_invite_to_join(payload: { subsessionId: string; subsessionName: string }): void
  • Occurs when the host assigns you to a subsession. You can decide whether to join the subsession or not. Use SubsessionClient.joinSubsession(subsessionId) to join the subsession.

    Parameters

    • payload: { subsessionId: string; subsessionName: string }
      • subsessionId: string

        Subsession ID.

      • subsessionName: string

        Subsession name.

    Returns void

  • event_bo_main_session_change(payload: any): void
  • Occurs when the host is in the subsession and the main session user changed.

    Parameters

    • payload: any

    Returns void

  • event_bo_room_countdown(payload: { countdown: number }): void
  • Occurs when the subsession has a countdown. This event will be triggered every second until time is up.

    Parameters

    • payload: { countdown: number }
      • Countdown: seconds remaining.
      • countdown: number

        Countdown for subsession.

    Returns void

  • event_bo_room_time_up(): void
  • Occurs when the countdown is over.

    Returns void

Video Events

  • event_network_quality_change(payload: { level: number; type: "uplink" | "downlink"; userId: number }): void
  • Occurs when network quality changes. The network quality reflects the video quality, so only when the user starts video, the data will broadcast to all users.

    Parameters

    • payload: { level: number; type: "uplink" | "downlink"; userId: number }

      the network quality

      • level: number

        Level 0,1: bad 2: normal 3,4,5: good

      • type: "uplink" | "downlink"

        Uplink or downlink.

      • userId: number

        User ID.

    Returns void

  • event_peer_video_state_change(payload: { action: "Start" | "Stop"; userId: number }): void
  • Occurs when other participants start or stop video.

    client.on('peer-video-state-change', (payload) => {
    if (payload.action === 'Start') {
    stream.renderVideo(document.querySelector('#participants-canvas'), payload.userId, 960, 540, X_CORD, Y_CORD, 3)
    } else if (payload.action === 'Stop') {
    stream.stopRenderVideo(document.querySelector('#participants-canvas'), payload.userId)
    }
    })

    Parameters

    • payload: { action: "Start" | "Stop"; userId: number }
      • action: "Start" | "Stop"

        Action of the peer video, Start or Stop.

      • userId: number

        User ID.

    Returns void

  • event_video_active_change(payload: { state: VideoActiveState; userId: number }): void
  • Occurs when the remote video stream changes.

    client.on('video-active-change', async(payload) => {
    try {
    if (payload.state === 'Active') {
    await stream.renderVideo(canvas,userId,1280,720,0,0,3);
    } else {
    await stream.stopRenderVideo(canvas,userId);
    }
    } catch (error) {
    console.log(error);
    }
    });

    Parameters

    Returns void

  • event_video_aspect_ratio_change(payload: { aspectRatio: number; userId: number }): void
  • Occurs when the SDK detects that the rendered video aspect ratio is not the same as the actual video aspect ratio. To correct the aspect ratio, use stream.adjustRenderedVideoPosition() to resize the video.

    client.on("video-aspect-ratio-change", async (payload) => {
    const { userId, aspectRatio } = payload;
    const height = width / aspectRatio;
    // resize the video
    await stream.adjustRenderedVideoPosition(
    canvasElm,
    userId,
    width,
    height,
    x,
    y
    );
    });

    Parameters

    • payload: { aspectRatio: number; userId: number }
      • aspectRatio: number

        Aspect ratio.

      • userId: number

        User ID.

    Returns void

  • Occurs when the local video capture stream changes.

    client.on('video-capturing-change', (payload) => {
    try {
    if (payload.state === 'Started') {
    console.log('Capture started');
    } else if (payload.state === 'Stopped') {
    console.log('Capture stopped');
    } else {
    console.log('Stop capturing Failed');
    }
    } catch (error) {
    console.log(error);
    }
    });

    Parameters

    Returns void

  • event_video_cell_detailed_change(payload: { fps?: number; height?: number; quality?: VideoQuality; userId: number; width?: number }): void
  • Occurs on video cell statistic data changes.

    Parameters

    • payload: { fps?: number; height?: number; quality?: VideoQuality; userId: number; width?: number }
      • Optional fps?: number

        Video frame rate in frames per second.

      • Optional height?: number

        Video resolution height.

      • Optional quality?: VideoQuality

        Video quality.

      • userId: number

        User ID.

      • Optional width?: number

        Video resolution width.

    Returns void

  • event_video_dimension_change(payload: { height: number; type: "received"; width: number }): void
  • Occurs when the received video content dimension changes.

    client.on('video-dimension-change', payload=>{
    viewportElement.style.width = `${payload.width}px`;
    viewportElement.style.height = `${payload.height}px`;
    })

    Parameters

    • payload: { height: number; type: "received"; width: number }
      • height: number

        Height.

      • type: "received"

        Type: Received video.

      • width: number

        Width.

    Returns void

  • event_video_statistic_data_change(payload: { data: { avg_loss: number; encoding: boolean; fps: number; height: number; jitter: number; max_loss: number; rtt: number; sample_rate: number; width: number }; type: "VIDEO_QOS_DATA" }): void
  • Occurs when the video statistics data is changed; decode (received).

    Parameters

    • payload: { data: { avg_loss: number; encoding: boolean; fps: number; height: number; jitter: number; max_loss: number; rtt: number; sample_rate: number; width: number }; type: "VIDEO_QOS_DATA" }

      The event detail

      • data
      • encoding: If encoding is true, the following metrics stand for the Send data statistics, otherwise, it stands for the Receive data statistics.
      • avg_loss: Video's average package loss.
      • jitter: Video's jitter.
      • max_loss: Video's maximum package loss.
      • rtt: Video's round trip time.
      • sample_rate: Video's sample rate.
      • width: Video's width.
      • height: Video's height.
      • fps: Video's frame rate in frames per second (FPS).
      • type : String VIDEO_QOS_DATA
      client.on('video-statistic-data-change', (payload) => {
      console.log('emit', payload);
      });
      • data: { avg_loss: number; encoding: boolean; fps: number; height: number; jitter: number; max_loss: number; rtt: number; sample_rate: number; width: number }

        Data.

        • avg_loss: number

          Video's average package loss.

        • encoding: boolean

          If encoding is true, the following metrics stand for the Send data statistics, otherwise, it stands for the Receive data statistics.

        • fps: number

          Video's frame rate in frames per second (FPS).

        • height: number

          Video's resolution height.

        • jitter: number

          Video's jitter.

        • max_loss: number

          Video's maximum package loss.

        • rtt: number

          Video's round trip time.

        • sample_rate: number

          Video's sample rate.

        • width: number

          Video's resolution width.

      • type: "VIDEO_QOS_DATA"

        Type.

    Returns void

  • event_video_vb_preload_change(payload: { isReady: boolean }): void
  • Occurs when the virtual background (VB) is enabled and the VB model is loaded.

    Parameters

    • payload: { isReady: boolean }
      • isReady: boolean

        Is ready to apply the virtual background.

    Returns void

Functions

  • event_meeting_query_change(payload: {}): void
  • Occurs when meeting query status changes.

    Parameters

    • payload: {}

      Returns void

    • event_smart_summary_change(payload: {}): void
    • Occurs when smart summary status changes.

      Parameters

      • payload: {}

        Returns void