Javascript API Reference
    Preparing search index...

    Type Alias MeetingEvent

    type MeetingEvent = {
        data: (
            data: {
                from: string;
                payload: Uint8Array | string;
                reliability: "reliable" | "unreliable";
                timestamp: number;
            },
        ) => void;
        "entry-requested": (
            data: {
                allow: Function;
                deny: Function;
                name: string;
                participantId: string;
            },
        ) => void;
        "entry-responded": (
            participantId: string,
            decision: "allowed" | "denied",
        ) => void;
        error: (data: { code: number; message: string }) => void;
        "hls-state-changed": (
            data: { livestreamUrl: string; playbackHlsUrl: string; status: string },
        ) => void;
        "livestream-state-changed": (data: { status: string }) => void;
        "main-participant-changed": (participant: Participant) => void;
        "media-relay-error": (meetingId: string, error: string) => void;
        "media-relay-request-received": (
            data: {
                accept: Function;
                displayName: string;
                meetingId: string;
                participantId: string;
                reject: Function;
            },
        ) => void;
        "media-relay-request-response": (
            participantId: string,
            decision: string,
            decidedBy: string,
        ) => void;
        "media-relay-started": (data: { meetingId: string }) => void;
        "media-relay-stopped": (
            data: { meetingId: string; reason: string },
        ) => void;
        "meeting-joined": () => void;
        "meeting-left": (reason: object) => void;
        "meeting-state-changed": (data: { state: string }) => void;
        "mic-requested": (
            data: { accept: Function; participantId: string; reject: Function },
        ) => void;
        "participant-joined": (participant: Participant) => void;
        "participant-left": (participant: Participant, reason: object) => void;
        "participant-mode-changed": (
            options: { mode: string; participantId: string },
        ) => void;
        "paused-all-streams": (data: { kind: string }) => void;
        "pin-state-changed": (
            data: { peerId: string; pinnedBy: string; state: boolean },
        ) => void;
        "presenter-changed": (activePresenterId: string | null) => void;
        "quality-limitation": (
            data: {
                state: "detected" | "resolved";
                timestamp: number;
                type: "congestion" | "bandwidth" | "cpu";
            },
        ) => void;
        "recording-state-changed": (data: { status: string }) => void;
        "resumed-all-streams": (data: { kind: string }) => void;
        "speaker-changed": (activeSpeakerId: string | null) => void;
        "transcription-state-changed": (
            data: { id: string; status: string },
        ) => void;
        "transcription-text": (
            data: {
                participantId: string;
                participantName: string;
                text: string;
                timestamp: number;
                type: string;
            },
        ) => void;
        "webcam-requested": (
            data: { accept: Function; participantId: string; reject: Function },
        ) => void;
        "whiteboard-started": (data: { url: string }) => void;
        "whiteboard-stopped": () => void;
    }
    Index

    Events

    data: (
        data: {
            from: string;
            payload: Uint8Array | string;
            reliability: "reliable" | "unreliable";
            timestamp: number;
        },
    ) => void
    • Triggered whenever a message is received over the DataStream.

    Type Declaration

      • (
            data: {
                from: string;
                payload: Uint8Array | string;
                reliability: "reliable" | "unreliable";
                timestamp: number;
            },
        ): void
      • Parameters

        • data: {
              from: string;
              payload: Uint8Array | string;
              reliability: "reliable" | "unreliable";
              timestamp: number;
          }
          • from: string

            ID of the participant who sent the message.

          • payload: Uint8Array | string

            The received message payload.

            • string for text messages
            • Uint8Array for binary data
          • reliability: "reliable" | "unreliable"

            Indicates whether the message delivery was reliable or unreliable.

          • timestamp: number

            Timestamp (in milliseconds since epoch) when the message was sent.

        Returns void

    meeting.on("data", (data) => {
    const { payload, from, timestamp, reliability } = data;
    });

    entry-requested

    "entry-requested": (
        data: {
            allow: Function;
            deny: Function;
            name: string;
            participantId: string;
        },
    ) => void
    • Triggered when a participant requests to join the meeting and their token includes the ask_join permission.
    • This event is emitted only to participants whose token includes the allow_join permission.

    Type Declaration

      • (
            data: {
                allow: Function;
                deny: Function;
                name: string;
                participantId: string;
            },
        ): void
      • Parameters

        • data: { allow: Function; deny: Function; name: string; participantId: string }

          Event payload containing participant details and actions.

          • allow: Function

            Call this function to allow the participant to join the meeting.

          • deny: Function

            Call this function to deny the participant’s request.

          • name: string

            Display name of the participant requesting to join.

          • participantId: string

            Unique ID of the participant requesting to join the meeting.

        Returns void

    meeting.on("entry-requested", (data) => {
    const { participantId, name, allow, deny } = data;

    console.log(`${name} requested to join the meeting`);

    // Allow the participant
    allow();

    // Or deny the request
    deny();
    });

    entry-responded

    "entry-responded": (
        participantId: string,
        decision: "allowed" | "denied",
    ) => void
    • Triggered when a participant’s join() request is responded to with an allow or deny decision.

    This event is emitted to:

    • All participants whose token includes the allow_join permission.
    • The participant who requested to join the meeting.

    Type Declaration

      • (participantId: string, decision: "allowed" | "denied"): void
      • Parameters

        • participantId: string

          ID of the participant who requested to join the meeting.

        • decision: "allowed" | "denied"

          The final decision for the join request.

          Possible values:

          • "allowed" – The participant was allowed to join.
          • "denied" – The participant was denied entry.

        Returns void

    meeting.on("entry-responded", (participantId, decision) => {
    // participantId will be id of participant who requested to join meeting

    if (decision === "allowed") {
    console.log("Participant allowed");
    } else {
    console.log("Participant denied");
    }
    });
    error: (data: { code: number; message: string }) => void
    • Triggered when an error occurs during the meeting lifecycle.
    • The event provides an error code and a descriptive message. Refer to Errors for a complete list of supported error codes.

    Type Declaration

      • (data: { code: number; message: string }): void
      • Parameters

        • data: { code: number; message: string }
          • code: number

            Numeric error code representing the type of error.

          • message: string

            Human-readable description of the error.

        Returns void

    meeting.on("error", (data) => {
    const { code, message } = data;
    console.error(`Error (${code}): ${message}`);
    });
    "hls-state-changed": (
        data: { livestreamUrl: string; playbackHlsUrl: string; status: string },
    ) => void
    • Triggered when the HLS (HTTP Live Streaming) state changes.

    Type Declaration

      • (data: { livestreamUrl: string; playbackHlsUrl: string; status: string }): void
      • Parameters

        • data: { livestreamUrl: string; playbackHlsUrl: string; status: string }
          • livestreamUrl: string

            Live HLS without playback support

          • playbackHlsUrl: string

            Live HLS with playback support

          • status: string

            Possible values:

            • HLS_STARTING - Hls is in starting phase and hasn't started yet.
            • HLS_STARTED- Hls has started successfully will return playbackHlsUrl and livestreamUrl.
            • HLS_PLAYABLE - Hls has started and the playbackHlsUrl and livestreamUrl is now playable.
            • HLS_STOPPING - Hls is in stopping phase and hasn't stopped yet.
            • HLS_STOPPED- Hls has stopped successfully.

        Returns void

    import { VideoSDK } from "@videosdk.live/js-sdk";

    const Constants = VideoSDK.Constants;

    meeting.on("hls-state-changed", (data) => {
    const { status } = data;

    if (status === Constants.hlsEvents.HLS_STARTING) {
    console.log("Meeting Hls is starting");
    } else if (status === Constants.hlsEvents.HLS_STARTED) {
    // when hls is started you will receive playbackHlsUrl
    const { playbackHlsUrl } = data;
    console.log("Meeting Hls is started");
    } else if (status === Constants.hlsEvents.HLS_STOPPING) {
    console.log("Meeting Hls is stopping");
    } else if (status === Constants.hlsEvents.HLS_STOPPED) {
    console.log("Meeting Hls is stopped");
    } else {
    //
    }
    });
    "livestream-state-changed": (data: { status: string }) => void
    • Triggered when the meeting’s livestream state changes.

    Type Declaration

      • (data: { status: string }): void
      • Parameters

        • data: { status: string }
          • status: string

            Possible values:

            • LIVESTREAM_STARTING - Livestream is in starting phase and hasn't started yet.
            • LIVESTREAM_STARTED - Livestream has started successfully.
            • LIVESTREAM_STOPPING - Livestream is in stopping phase and hasn't stopped yet.
            • LIVESTREAM_STOPPED - Livestream has stopped successfully.

        Returns void

    import { VideoSDK } from "@videosdk.live/js-sdk";

    const Constants = VideoSDK.Constants;

    meeting.on("livestream-state-changed", (data) => {
    const { status } = data;

    if (status === Constants.livestreamEvents.LIVESTREAM_STARTING) {
    console.log("Meeting livestream is starting");
    } else if (status === Constants.livestreamEvents.LIVESTREAM_STARTED) {
    console.log("Meeting livestream is started");
    } else if (status === Constants.livestreamEvents.LIVESTREAM_STOPPING) {
    console.log("Meeting livestream is stopping");
    } else if (status === Constants.livestreamEvents.LIVESTREAM_STOPPED) {
    console.log("Meeting livestream is stopped");
    } else {
    //
    }
    });
    "main-participant-changed": (participant: Participant) => void
    • Triggered when the main participant in the meeting changes.

    Type Declaration

      • (participant: Participant): void
      • Parameters

        • participant: Participant

          The Participant instance who is now the main participant.

        Returns void

    meeting.on("main-participant-changed", (participant) => {
    //
    });
    "media-relay-error": (meetingId: string, error: string) => void
    • Triggered when an error occurs during media relay.

    Type Declaration

      • (meetingId: string, error: string): void
      • Parameters

        • meetingId: string

          ID of the meeting where the error occurred.

        • error: string

          Description of the error.

        Returns void

    meeting.on("media-relay-error", (meetingId, error) => {
    //
    });
    "media-relay-request-received": (
        data: {
            accept: Function;
            displayName: string;
            meetingId: string;
            participantId: string;
            reject: Function;
        },
    ) => void
    • Triggered when a media relay request is received in the destination meeting.

    Type Declaration

      • (
            data: {
                accept: Function;
                displayName: string;
                meetingId: string;
                participantId: string;
                reject: Function;
            },
        ): void
      • Parameters

        • data: {
              accept: Function;
              displayName: string;
              meetingId: string;
              participantId: string;
              reject: Function;
          }
          • accept: Function

            Call this function to accept the media relay request.

          • displayName: string

            Display name of the participant requesting the media relay.

          • meetingId: string

            ID of the meeting from which the media relay request originated.

          • participantId: string

            ID of the participant who initiated the media relay request.

          • reject: Function

            Call this function to reject the media relay request.

        Returns void

    meeting.on("media-relay-request-received", ({
    participantId,
    meetingId,
    displayName,
    accept,
    reject,
    }) => {
    // Handle request
    });
    "media-relay-request-response": (
        participantId: string,
        decision: string,
        decidedBy: string,
    ) => void
    • Triggered when a response is received for a media relay request in the source meeting.

    Type Declaration

      • (participantId: string, decision: string, decidedBy: string): void
      • Parameters

        • participantId: string

          ID of the participant who responded to the media relay request.

        • decision: string

          Decision taken for the request.

        • decidedBy: string

          ID of the participant who decided the decision.

        Returns void

    meeting.on("media-relay-request-response", (participantId, decision) => {
    //
    });
    "media-relay-started": (data: { meetingId: string }) => void
    • Triggered when media relay successfully starts for a destination meeting.

    Type Declaration

      • (data: { meetingId: string }): void
      • Parameters

        • data: { meetingId: string }
          • meetingId: string

            ID of the meeting where the media relay has started.

        Returns void

    meeting.on("media-relay-started", ({ meetingId }) => {
    //
    });
    "media-relay-stopped": (data: { meetingId: string; reason: string }) => void
    • Triggered when media relay stops for a destination meeting.

    Type Declaration

      • (data: { meetingId: string; reason: string }): void
      • Parameters

        • data: { meetingId: string; reason: string }
          • meetingId: string

            ID of the meeting where the media relay stopped.

          • reason: string

            Reason why the media relay stopped.

        Returns void

    meeting.on("media-relay-stopped", ({ meetingId, reason }) => {
    //
    });
    "meeting-joined": () => void
    • Triggered when the local participant successfully joins the meeting.
    meeting.on("meeting-joined", () => {
    // Participant has joined the meeting
    });
    "meeting-left": (reason: object) => void
    • Triggered when the local participant leaves the meeting.
    • When this event is emitted, a reason object is also provided that explains why the participant left the meeting.

    The table below lists the possible reason codes:

    Reason Code Description
    WEBSOCKET_DISCONNECTED 1001 Socket disconnected
    REMOVE_PEER 1002 Participant was removed from the meeting
    REMOVE_PEER_VIEWER_MODE_CHANGED 1003 Participant removed due to viewer mode change
    REMOVE_PEER_MEDIA_RELAY_STOP 1004 Participant removed because media relay was stopped
    SWITCH_ROOM 1005 Participant switched to another room
    ROOM_CLOSE 1006 The meeting was closed
    UNKNOWN 1007 Participant disconnected due to an unknown reason
    REMOVE_ALL 1008 All participants were removed
    MEETING_END_API 1009 Meeting ended programmatically
    REMOVE_PEER_API 1010 Participant removed via API
    DUPLICATE_PARTICIPANT 1011 Participant joined from another device
    MANUAL_LEAVE_CALLED 1101 Participant manually left the meeting
    WEBSOCKET_CONNECTION_ATTEMPTS_EXHAUSTED 1102 WebSocket connection retries exhausted
    JOIN_ROOM_FAILED 1103 Failed to join the meeting
    SWITCH_ROOM_FAILED 1104 Failed to switch rooms

    Type Declaration

      • (reason: object): void
      • Parameters

        • reason: object

          Object containing the reason and corresponding code.

        Returns void

    meeting.on("meeting-left", (reason) => {
    if (reason.code === Constants.leaveReason.MANUAL_LEAVE_CALLED) {
    // Handle manual leave
    }
    });
    "meeting-state-changed": (data: { state: string }) => void
    • Triggered whenever the meeting state changes.

    Type Declaration

      • (data: { state: string }): void
      • Parameters

        • data: { state: string }
          • state: string

            The current meeting state. Possible values:

            • CONNECTING
            • CONNECTED
            • RECONNECTING
            • DISCONNECTED
            • FAILED

        Returns void

    meeting.on("meeting-state-changed", (data) => {
    const { state } = data;

    switch (state) {
    case "CONNECTING":
    console.log("Meeting is connecting");
    break;
    case "CONNECTED":
    console.log("Meeting is connected");
    break;
    case "DISCONNECTED":
    console.log("Meeting disconnected");
    break;
    case "RECONNECTING":
    console.log("Reconnecting to meeting");
    break;
    case "FAILED":
    console.log("Meeting failed");
    break;
    default:
    console.log("Unknown state:", state);
    }
    });
    "mic-requested": (
        data: { accept: Function; participantId: string; reject: Function },
    ) => void
    • This event will be emitted to the participant B when any other participant A requests to enable mic of participant B.
    • On accepting the request, mic of participant B will be enabled.

    Type Declaration

      • (data: { accept: Function; participantId: string; reject: Function }): void
      • Parameters

        • data: { accept: Function; participantId: string; reject: Function }
          • accept: Function

            Call this function to accept the request and enable your microphone.

          • participantId: string

            ID of the participant who requested to enable your microphone.

          • reject: Function

            Call this function to reject the request.

        Returns void

    meeting.on("mic-requested", (data) => {
    const { participantId, accept, reject } = data;

    // Accept the request
    accept();

    // Or reject the request
    reject();
    });
    "participant-joined": (participant: Participant) => void
    • Triggered when a new participant joins the meeting.

    Type Declaration

      • (participant: Participant): void
      • Parameters

        • participant: Participant

          The Participant instance representing the newly joined participant.

        Returns void

    meeting.on("participant-joined", (participant) => {
    //
    });
    "participant-left": (participant: Participant, reason: object) => void
    • Triggered when a participant leaves the meeting.
    • When this event is emitted, a reason object is provided that describes why the participant left.

    Possible reason codes:

    Reason Code Description
    WEBSOCKET_DISCONNECTED 1001 Socket disconnected
    REMOVE_PEER 1002 Participant was removed from the meeting
    REMOVE_PEER_VIEWER_MODE_CHANGED 1003 Participant removed because viewer mode was changed
    REMOVE_PEER_MEDIA_RELAY_STOP 1004 Participant removed because media relay was stopped
    SWITCH_ROOM 1005 Participant switched to a different room
    ROOM_CLOSE 1006 The meeting has been closed
    UNKNOWN 1007 Participant disconnected due to an unknown reason
    REMOVE_ALL 1008 Remove All from the meeting
    MEETING_END_API 1009 Meeting Ended.
    REMOVE_PEER_API 1010 Participant removed from the meeting
    DUPLICATE_PARTICIPANT 1011 Leaving meeting, since this participantId joined from another device.
    MANUAL_LEAVE_CALLED 1101 Participant manually called the leave() method to exit the meeting
    WEBSOCKET_CONNECTION_ATTEMPTS_EXHAUSTED 1102 Meeting left after multiple failed websocket connection attempts.
    JOIN_ROOM_FAILED 1103 Meeting left due to an error while joining the room.
    SWITCH_ROOM_FAILED 1104 Meeting left due to an error while switching rooms.

    Type Declaration

      • (participant: Participant, reason: object): void
      • Parameters

        • participant: Participant

          The Participant instance who left the meeting.

        • reason: object

          An object describing the reason and corresponding code.

        Returns void

    meeting.on("participant-left", (participant, reason) => {
    if (reason.code === Constants.leaveReason.MANUAL_LEAVE_CALLED) {
    // Handle manual leave
    }
    });
    "participant-mode-changed": (
        options: { mode: string; participantId: string },
    ) => void
    • Triggered when a participant’s mode changes.

    Type Declaration

      • (options: { mode: string; participantId: string }): void
      • Parameters

        • options: { mode: string; participantId: string }
          • mode: string

            The new mode of the participant. Possible values are defined in modes.

          • participantId: string

            ID of the participant whose mode has changed.

        Returns void

    meeting.on("participant-mode-changed", ({ participantId, mode }) => {
    console.log(`${participantId} changed mode to ${mode}`);
    });
    "paused-all-streams": (data: { kind: string }) => void
    • Triggered when all or specific media streams are paused.

    Type Declaration

      • (data: { kind: string }): void
      • Parameters

        • data: { kind: string }
          • kind: string

            Indicates which media type was paused:

            • "audio" – Audio streams
            • "video" – Video streams
            • "share" – Screen-share video streams
            • "shareAudio" – Screen-share audio streams

        Returns void

    meeting.on("paused-all-streams", (data) => {
    const { kind } = data;
    });
    "pin-state-changed": (
        data: { peerId: string; pinnedBy: string; state: boolean },
    ) => void
    • Triggered when the pin state of a participant changes.
    • This event is emitted for all participants whenever a participant is pinned or unpinned.
    meeting.on("pin-state-changed", (data) => {
    const { peerId, state, pinnedBy } = data;
    console.log("Pin state changed:", peerId, state, pinnedBy);
    });
    "presenter-changed": (activePresenterId: string | null) => void
    • Triggered when a participant starts or stops screen sharing.
    • If screen sharing stops, the callback receives null.

    Type Declaration

      • (activePresenterId: string | null): void
      • Parameters

        • activePresenterId: string | null

          ID of the participant currently presenting, or null if no one is presenting.

        Returns void

    meeting.on("presenter-changed", (activePresenterId) => {
    //
    });
    "quality-limitation": (
        data: {
            state: "detected" | "resolved";
            timestamp: number;
            type: "congestion" | "bandwidth" | "cpu";
        },
    ) => void
    • Triggered when a quality limitation is detected or resolved during the meeting.

    Type Declaration

      • (
            data: {
                state: "detected" | "resolved";
                timestamp: number;
                type: "congestion" | "bandwidth" | "cpu";
            },
        ): void
      • Parameters

        • data: {
              state: "detected" | "resolved";
              timestamp: number;
              type: "congestion" | "bandwidth" | "cpu";
          }
          • state: "detected" | "resolved"

            Indicates whether the limitation is currently active or resolved.

          • timestamp: number

            Time (in milliseconds since epoch) when the event occurred.

          • type: "congestion" | "bandwidth" | "cpu"

            Specifies the type of limitation.

        Returns void

    meeting.on("quality-limitation", ({ type, state, timestamp }) => {
    //
    });
    "recording-state-changed": (data: { status: string }) => void
    • Triggered when the meeting’s recording state changes.

    Type Declaration

      • (data: { status: string }): void
      • Parameters

        • data: { status: string }
          • status: string

            The current recording state:

            • RECORDING_STARTING - Recording is in starting phase and hasn't started yet.
            • RECORDING_STARTED - Recording has started successfully.
            • RECORDING_STOPPING - Recording is in stopping phase and hasn't stopped yet.
            • RECORDING_STOPPED - Recording has stopped successfully.

        Returns void

    import { VideoSDK } from "@videosdk.live/js-sdk";

    const Constants = VideoSDK.Constants;

    meeting.on("recording-state-changed", (data) => {
    const { status } = data;

    if (status === Constants.recordingEvents.RECORDING_STARTING) {
    console.log("Meeting recording is starting");
    } else if (status === Constants.recordingEvents.RECORDING_STARTED) {
    console.log("Meeting recording is started");
    } else if (status === Constants.recordingEvents.RECORDING_STOPPING) {
    console.log("Meeting recording is stopping");
    } else if (status === Constants.recordingEvents.RECORDING_STOPPED) {
    console.log("Meeting recording is stopped");
    } else {
    //
    }
    });
    "resumed-all-streams": (data: { kind: string }) => void
    • Triggered when paused media streams are resumed.

    Type Declaration

      • (data: { kind: string }): void
      • Parameters

        • data: { kind: string }
          • kind: string

            Indicates which media type was resumed:

            • "audio" – Audio streams
            • "video" – Video streams
            • "share" – Screen-share video streams
            • "shareAudio" – Screen-share audio streams

        Returns void

    meeting.on("resumed-all-streams", (data) => {
    const { kind } = data;
    });
    "speaker-changed": (activeSpeakerId: string | null) => void
    • Triggered when the active speaker changes.
    • If no participant is actively speaking, null is returned.

    Type Declaration

      • (activeSpeakerId: string | null): void
      • Parameters

        • activeSpeakerId: string | null

          ID of the currently active speaker, or null if no one is speaking.

        Returns void

    meeting.on("speaker-changed", (activeSpeakerId) => {
    //
    });
    "transcription-state-changed": (data: { id: string; status: string }) => void
    • Triggered when the state of realtime transcription changes.

    Type Declaration

      • (data: { id: string; status: string }): void
      • Parameters

        • data: { id: string; status: string }
          • id: string

            ID of the transcription session.

          • status: string

            status has following values:

            • TRANSCRIPTION_STARTING - Realtime Transcription is in starting phase and hasn't started yet.
            • TRANSCRIPTION_STARTED - Realtime Transcription has started successfully.
            • TRANSCRIPTION_STOPPING - Realtime Transcription is in stopping phase and hasn't stopped yet.
            • TRANSCRIPTION_STOPPED - Realtime Transcription has stopped successfully.

        Returns void


    import { VideoSDK } from "@videosdk.live/js-sdk";

    const Constants = VideoSDK.Constants;
    meeting.on("transcription-state-changed", (data) => {
    let { status, id } = data;

    if (status === Constants.transcriptionEvents.TRANSCRIPTION_STARTING) {
    console.log(`Realtime Transcription with ${id} is starting`);
    } else if (status === Constants.transcriptionEvents.TRANSCRIPTION_STARTED) {
    console.log(`Realtime Transcription with ${id} is started`);
    } else if (status === Constants.transcriptionEvents.TRANSCRIPTION_STOPPING) {
    console.log(`Realtime Transcription with ${id} is stopping`);
    } else if (status === Constants.transcriptionEvents.TRANSCRIPTION_STOPPED) {
    console.log(`Realtime Transcription with ${id} is stopped`);
    }
    });
    "transcription-text": (
        data: {
            participantId: string;
            participantName: string;
            text: string;
            timestamp: number;
            type: string;
        },
    ) => void
    • Triggered when realtime transcription text is received.

    Type Declaration

      • (
            data: {
                participantId: string;
                participantName: string;
                text: string;
                timestamp: number;
                type: string;
            },
        ): void
      • Parameters

        • data: {
              participantId: string;
              participantName: string;
              text: string;
              timestamp: number;
              type: string;
          }
          • participantId: string

            ID of the participant whose speech was transcribed.

          • participantName: string

            Name of the participant whose speech was transcribed.

          • text: string

            Transcribed text content.

          • timestamp: number

            Timestamp (in milliseconds since epoch) when the transcription was generated.

          • type: string

            Type of transcription event.

        Returns void

    meeting.on("transcription-text", (data) => {
    const { participantName, text, timestamp, type} = data;
    console.log(`${participantName}: ${text}`);
    });
    "webcam-requested": (
        data: { accept: Function; participantId: string; reject: Function },
    ) => void
    • This event will be emitted to the participant B when any other participant A requests to enable webcam of participant B.
    • On accepting the request, webcam of participant B will be enabled.

    Type Declaration

      • (data: { accept: Function; participantId: string; reject: Function }): void
      • Parameters

        • data: { accept: Function; participantId: string; reject: Function }
          • accept: Function

            Call this function to accept the request and enable your webcam.

          • participantId: string

            ID of the participant who requested to enable your webcam.

          • reject: Function

            Call this function to reject the request.

        Returns void

    meeting.on("webcam-requested", (data) => {
    const { participantId, accept, reject } = data;

    // Accept the request
    accept();

    // Or reject the request
    reject();
    });
    "whiteboard-started": (data: { url: string }) => void
    • Triggered when the whiteboard is successfully started.
    • This event provides the URL of the active whiteboard session.

    Type Declaration

      • (data: { url: string }): void
      • Parameters

        • data: { url: string }
          • url: string

            URL of the whiteboard session.

        Returns void

    meeting.on("whiteboard-started", (data) => {
    const { url } = data;
    // Use the whiteboard URL
    });
    "whiteboard-stopped": () => void
    • Triggered when the whiteboard session is stopped for all participants.
    meeting.on("whiteboard-stopped", () => {
    // Whiteboard session stopped
    });