Zoom Meeting SDK for Web - Component View
    Preparing search index...

    Function on

    • Listens for the events and handles them. For example:

      on("connection-change", (payload) => {
      if (payload.state === 'Closed) {
      console.log("Meeting ended")
      }
      })

      Parameters

      • event: "connection-change"

        Event name (for meeting end event, set the event to "connection-change").

      • callback: (payload: any) => void

        Event handler (for meeting end event, the payload of the callback is payload.state === 'Closed').

      Returns void

    • Listens for the events and handles them. For example:

      on("connection-change", (payload) => {
      if (payload.state === 'Closed) {
      console.log("Meeting ended")
      }
      })

      Parameters

      • event: "audio-statistic-data-change"

        Event name (for meeting end event, set the event to "connection-change").

      • callback: (
            payload: {
                data: {
                    avg_loss: number;
                    encoding: boolean;
                    jitter: number;
                    max_loss: number;
                    rtt: number;
                    sample_rate: number;
                };
                type: string;
            },
        ) => void

        Event handler (for meeting end event, the payload of the callback is payload.state === 'Closed').

      Returns void

    • Listens for the events and handles them. For example:

      on("connection-change", (payload) => {
      if (payload.state === 'Closed) {
      console.log("Meeting ended")
      }
      })

      Parameters

      • event: "video-statistic-data-change"

        Event name (for meeting end event, set the event to "connection-change").

      • callback: (
            payload: {
                data: {
                    avg_loss: number;
                    encoding: boolean;
                    fps: number;
                    height: number;
                    jitter: number;
                    max_loss: number;
                    rtt: number;
                    sample_rate: number;
                    width: number;
                };
                type: string;
            },
        ) => void

        Event handler (for meeting end event, the payload of the callback is payload.state === 'Closed').

          • (
                payload: {
                    data: {
                        avg_loss: number;
                        encoding: boolean;
                        fps: number;
                        height: number;
                        jitter: number;
                        max_loss: number;
                        rtt: number;
                        sample_rate: number;
                        width: number;
                    };
                    type: string;
                },
            ): 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: string;
              }

              The event detail.

              • data
              • encoding: If encoding is true, the data is encoding video data statistics.
              • avg_loss: The video's average package loss.
              • jitter: The video's jitter.
              • max_loss: The video's maximum package loss.
              • rtt: The video's round trip time.
              • sample_rate: The video's sample rate.
              • width: The video's width.
              • height: The video's height.
              • fps: The video's frames per second (fps).
              • type : string VIDEO_QOS_DATA.
              client.on('video_statistic_data_change', (payload) => {
              console.log('emit', payload);
              });

            Returns void

      Returns void

    • Listens for the events and handles them. For example:

      on("connection-change", (payload) => {
      if (payload.state === 'Closed) {
      console.log("Meeting ended")
      }
      })

      Parameters

      • event: "share-statistic-data-change"

        Event name (for meeting end event, set the event to "connection-change").

      • callback: (
            payload: {
                data: {
                    avg_loss: number;
                    encoding: boolean;
                    fps: number;
                    height: number;
                    jitter: number;
                    max_loss: number;
                    rtt: number;
                    width: number;
                };
                type: string;
            },
        ) => void

        Event handler (for meeting end event, the payload of the callback is payload.state === 'Closed').

          • (
                payload: {
                    data: {
                        avg_loss: number;
                        encoding: boolean;
                        fps: number;
                        height: number;
                        jitter: number;
                        max_loss: number;
                        rtt: number;
                        width: number;
                    };
                    type: string;
                },
            ): 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;
                      width: number;
                  };
                  type: string;
              }

              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: The share video's average package loss.
              • fps: The share video's frames per second (FPS).
              • height: The share video's height.
              • jitter: The share video's jitter.
              • max_loss: The share video's maximum package loss.
              • rtt: The share video's round trip time.
              • width: The share video's width.
              • type : string VIDEOSHARE_QOS_DATA.
              client.on('share_statistic_data_change', (payload) => {
              console.log('emit', payload);
              });

            Returns void

      Returns void

    • Listens for the events and handles them. For example:

      on("connection-change", (payload) => {
      if (payload.state === 'Closed) {
      console.log("Meeting ended")
      }
      })

      Parameters

      • event: "caption-message"

        Event name (for meeting end event, set the event to "connection-change").

      • callback: (
            payload: {
                avatar?: string;
                displayName: string;
                done?: boolean;
                language: LiveTranscriptionLanguageCode;
                msgId: string;
                source: LiveTranscriptionMessageSource;
                text: string;
                timestamp: number;
                userId: number;
            },
        ) => void

        Event handler (for meeting end event, the payload of the callback is payload.state === 'Closed').

      Returns void

    • Listens for the events and handles them. For example:

      on("connection-change", (payload) => {
      if (payload.state === 'Closed) {
      console.log("Meeting ended")
      }
      })

      Parameters

      • event: "recording-change"

        Event name (for meeting end event, set the event to "connection-change").

      • callback: (payload: RecordingStatusValue | RecordingStatus) => void

        Event handler (for meeting end event, the payload of the callback is payload.state === 'Closed').

      Returns void

    • Listens for the events and handles them. For example:

      on("connection-change", (payload) => {
      if (payload.state === 'Closed) {
      console.log("Meeting ended")
      }
      })

      Parameters

      • event: "local-recording-change"

        Event name (for meeting end event, set the event to "connection-change").

      • callback: (payload: { bLocalRecord: boolean; userId: number }) => void

        Event handler (for meeting end event, the payload of the callback is payload.state === 'Closed').

      Returns void

    • Listens for the events and handles them. For example:

      on("connection-change", (payload) => {
      if (payload.state === 'Closed) {
      console.log("Meeting ended")
      }
      })

      Parameters

      • event: "user-added"

        Event name (for meeting end event, set the event to "connection-change").

      • callback: (payload: ParticipantPropertiesPayload) => void

        Event handler (for meeting end event, the payload of the callback is payload.state === 'Closed').

      Returns void

    • Listens for the events and handles them. For example:

      on("connection-change", (payload) => {
      if (payload.state === 'Closed) {
      console.log("Meeting ended")
      }
      })

      Parameters

      • event: "user-removed"

        Event name (for meeting end event, set the event to "connection-change").

      • callback: (payload: ParticipantPropertiesPayload) => void

        Event handler (for meeting end event, the payload of the callback is payload.state === 'Closed').

      Returns void

    • Listens for the events and handles them. For example:

      on("connection-change", (payload) => {
      if (payload.state === 'Closed) {
      console.log("Meeting ended")
      }
      })

      Parameters

      • event: "user-updated"

        Event name (for meeting end event, set the event to "connection-change").

      • callback: (payload: ParticipantPropertiesPayload) => void

        Event handler (for meeting end event, the payload of the callback is payload.state === 'Closed').

      Returns void

    • Listens for the events and handles them. For example:

      on("connection-change", (payload) => {
      if (payload.state === 'Closed) {
      console.log("Meeting ended")
      }
      })

      Parameters

      • event: "peer-share-state-change"

        Event name (for meeting end event, set the event to "connection-change").

      • callback: (payload: { action: string; userId: number }) => void

        Event handler (for meeting end event, the payload of the callback is payload.state === 'Closed').

      Returns void

    • Listens for the events and handles them. For example:

      on("connection-change", (payload) => {
      if (payload.state === 'Closed) {
      console.log("Meeting ended")
      }
      })

      Parameters

      • event: "active-speaker"

        Event name (for meeting end event, set the event to "connection-change").

      • callback: (payload: ActiveSpeaker[]) => void

        Event handler (for meeting end event, the payload of the callback is payload.state === 'Closed').

      Returns void

    • Listens for the events and handles them. For example:

      on("connection-change", (payload) => {
      if (payload.state === 'Closed) {
      console.log("Meeting ended")
      }
      })

      Parameters

      • event: "room-state-change"

        Event name (for meeting end event, set the event to "connection-change").

      • callback: (payload: { status: BreakoutRoomStatus }) => void

        Event handler (for meeting end event, the payload of the callback is payload.state === 'Closed').

      Returns void

    • Listens for the events and handles them. For example:

      on("connection-change", (payload) => {
      if (payload.state === 'Closed) {
      console.log("Meeting ended")
      }
      })

      Parameters

      • event: "main-session-user-updated"

        Event name (for meeting end event, set the event to "connection-change").

      • callback: (payload: {}) => void

        Event handler (for meeting end event, the payload of the callback is payload.state === 'Closed').

      Returns void

    • Listens for the events and handles them. For example:

      on("connection-change", (payload) => {
      if (payload.state === 'Closed) {
      console.log("Meeting ended")
      }
      })

      Parameters

      • event: "broadcast-message"

        Event name (for meeting end event, set the event to "connection-change").

      • callback: (payload: { message: string }) => void

        Event handler (for meeting end event, the payload of the callback is payload.state === 'Closed').

      Returns void

    • Listens for the events and handles them. For example:

      on("connection-change", (payload) => {
      if (payload.state === 'Closed) {
      console.log("Meeting ended")
      }
      })

      Parameters

      • event: "network-quality-change"

        Event name (for meeting end event, set the event to "connection-change").

      • callback: (payload: { level: number; type: string; userId: number }) => void

        Event handler (for meeting end event, the payload of the callback is payload.state === 'Closed').

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

            Parameters

            • payload: { level: number; type: string; userId: number }
              • level: number

                Network quality level. Values can be integers from 0 to 5. Poor: 0, 1 Normal: 2 Good: 3, 4, 5

              • type: string

                Whether the network level is for uplink or downlink. Values can only be 'uplink' or 'downlink'.

              • userId: number

                User ID.

            Returns void

      Returns void

    • Listens for the events and handles them. For example:

      on("connection-change", (payload) => {
      if (payload.state === 'Closed) {
      console.log("Meeting ended")
      }
      })

      Parameters

      • event: "media-capture-status-change"

        Event name (for meeting end event, set the event to "connection-change").

      • callback: (payload: { bLocalRecord: boolean; userId: number }) => void

        Event handler (for meeting end event, the payload of the callback is payload.state === 'Closed').

      Returns void

    • Listens for the events and handles them. For example:

      on("connection-change", (payload) => {
      if (payload.state === 'Closed) {
      console.log("Meeting ended")
      }
      })

      Parameters

      • event: "chat-on-message"

        Event name (for meeting end event, set the event to "connection-change").

      • callback: (payload: ChatMessage | ChatRecord) => void

        Event handler (for meeting end event, the payload of the callback is payload.state === 'Closed').

      Returns void

    • Listens for the events and handles them. For example:

      on("connection-change", (payload) => {
      if (payload.state === 'Closed) {
      console.log("Meeting ended")
      }
      })

      Parameters

      • event: "media-capture-permission-change"

        Event name (for meeting end event, set the event to "connection-change").

      • callback: (payload: { canRecord?: boolean; type: string; value: string }) => void

        Event handler (for meeting end event, the payload of the callback is payload.state === 'Closed').

      Returns void

    • Listens for the events and handles them. For example:

      on("connection-change", (payload) => {
      if (payload.state === 'Closed) {
      console.log("Meeting ended")
      }
      })

      Parameters

      • event: "join-speed"

        Event name (for meeting end event, set the event to "connection-change").

      • callback: (
            payload: {
                desc: string;
                eventType: string;
                tagId: number;
                time: number;
                timeStr: string;
            },
        ) => void

        Event handler (for meeting end event, the payload of the callback is payload.state === 'Closed').

          • (
                payload: {
                    desc: string;
                    eventType: string;
                    tagId: number;
                    time: number;
                    timeStr: string;
                },
            ): void
          • Occurs when users join a meeting or waiting room or start audio or video.

            Parameters

            • payload: {
                  desc: string;
                  eventType: string;
                  tagId: number;
                  time: number;
                  timeStr: string;
              }
              • desc: string

                Detailed description for the event.

              • eventType: string
              • tagId: number
              • time: number

                A number representing the timestamp, in milliseconds, for the current time.

              • timeStr: string

                A string representing the given date in the date time string format.

            Returns void

      Returns void

    • Listens for the events and handles them. For example:

      on("connection-change", (payload) => {
      if (payload.state === 'Closed) {
      console.log("Meeting ended")
      }
      })

      Parameters

      • event: "far-end-camera-request-control"

        Event name (for meeting end event, set the event to "connection-change").

      • listener: (
            payload: {
                currentControllingDisplayName?: string;
                currentControllingUserId?: number;
                displayName: string;
                userId: number;
            },
        ) => void
          • (
                payload: {
                    currentControllingDisplayName?: string;
                    currentControllingUserId?: number;
                    displayName: string;
                    userId: number;
                },
            ): void
          • Occurs when far end camera request is received

            Parameters

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

              the event detail

              • OptionalcurrentControllingDisplayName?: string

                The display name for who is controlling the camera.

              • OptionalcurrentControllingUserId?: number

                The user ID for who is controlling the camera.

              • displayName: string

                The display name for who requested control.

              • userId: number

                The user ID for who requested control.

            Returns void

      Returns void

    • Listens for the events and handles them. For example:

      on("connection-change", (payload) => {
      if (payload.state === 'Closed) {
      console.log("Meeting ended")
      }
      })

      Parameters

      • event: "far-end-camera-response-control"

        Event name (for meeting end event, set the event to "connection-change").

      • listener: (
            payload: {
                displayName: string;
                isApproved: boolean;
                reason?: FarEndCameraControlDeclinedReason;
                userId: number;
            },
        ) => void
          • (
                payload: {
                    displayName: string;
                    isApproved: boolean;
                    reason?: FarEndCameraControlDeclinedReason;
                    userId: number;
                },
            ): void
          • Occurs when far end camera response is received.

            Parameters

            Returns void

      Returns void

    • Listens for the events and handles them. For example:

      on("connection-change", (payload) => {
      if (payload.state === 'Closed) {
      console.log("Meeting ended")
      }
      })

      Parameters

      • event: "far-end-camera-in-control-change"

        Event name (for meeting end event, set the event to "connection-change").

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

            Parameters

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

              the event detail

              • isControlled: boolean

                Is controlled by other user.

              • OptionaluserId?: number

                The ID of the user in control.

            Returns void

      Returns void

    • Listens for the events and handles them. For example:

      on("connection-change", (payload) => {
      if (payload.state === 'Closed) {
      console.log("Meeting ended")
      }
      })

      Parameters

      • event: "far-end-camera-capability-change"

        Event name (for meeting end event, set the event to "connection-change").

      • listener: (payload: { ptz: PTZCameraCapability; userId: number }) => void

      Returns void