Options
All
  • Public
  • Public/Protected
  • All
Menu

The client for managing whiteboard functionality in a Zoom meeting. Provides methods for starting, viewing, and controlling collaborative whiteboards.

Index

Functions

  • canStartWhiteboard(): boolean
  • Check if the current user can start a whiteboard session. Takes into account permissions, current sharing state, and whiteboard status. Returns false if whiteboard is disabled, screen sharing is active, or user lacks necessary permissions.

    example
    const startButton = document.getElementById('start-whiteboard-btn');
    startButton.disabled = !whiteboardClient.canStartWhiteboard();

    // Or use in conditional logic
    if (whiteboardClient.canStartWhiteboard()) {
    await whiteboardClient.startWhiteboardScreen(element);
    } else {
    console.log('You do not have permission to start a whiteboard');
    }
    since

    2.3.5

    Returns boolean

    true if the current user is allowed to start a whiteboard, false otherwise

  • exportWhiteboard(format: "pdf", name?: string, includeComments?: boolean): ExecutedResult | Promise<string>
  • Export the current whiteboard content to a file. Downloads the whiteboard as an document (PDF). Can optionally include comments and annotations in the export.

    throws

    {INVALID_OPERATION} If whiteboard is not currently in progress

    example
    // Export as PDF with default name
    await whiteboardClient.exportWhiteboard('pdf');

    // Export as pdf with custom name and comments
    await whiteboardClient.exportWhiteboard('pdf', 'brainstorm-session', true);
    since

    2.3.5

    Parameters

    • format: "pdf"

      Export format: 'pdf' for document

    • Optional name: string

      Optional custom filename (without extension). Defaults to meeting topic

    • Optional includeComments: boolean

      Whether to include comments in the export. Defaults to false

    Returns ExecutedResult | Promise<string>

    Promise that resolves when export completes and download starts

  • Get the current whiteboard presenter information. Returns null if no whiteboard session is active.

    example
    const presenter = whiteboardClient.getWhiteboardPresenter();
    if (presenter) {
    console.log(`${presenter.displayName} is presenting the whiteboard`);
    }
    since

    2.3.5

    Returns Participant | null

    Participant object of the current presenter, or null if no active session

  • Get the current whiteboard session status.

    example
    const status = whiteboardClient.getWhiteboardStatus();
    if (status === WhiteboardStatus.InProgress) {
    console.log('Whiteboard is active');
    }
    since

    2.3.5

    Returns WhiteboardStatus

    Current WhiteboardStatus (Closed, Pending, or InProgress)

  • isWhiteboardEnabled(): boolean
  • Check if whiteboard feature is enabled for the current meeting. Whiteboard may be disabled due to account settings, device limitations, or unsupported platforms (e.g., mobile browsers).

    example
    if (whiteboardClient.isWhiteboardEnabled()) {
    // Show whiteboard UI controls
    } else {
    // Hide or disable whiteboard features
    }
    since

    2.3.5

    Returns boolean

    true if whiteboard feature is available, false otherwise

  • Start a whiteboard session as the presenter. The current user becomes the whiteboard presenter.

    throws

    {INVALID_OPERATION} If screen sharing is in progress or whiteboard conflicts exist

    throws

    {INSUFFICIENT_PRIVILEGES} If user lacks permission to start whiteboard

    throws

    {INVALID_PARAMETERS} If the provided docId or templateId is incorrect

    example
    // Start a new blank whiteboard
    await whiteboardClient.startWhiteboardScreen(whiteboardElement);
    since

    2.3.5

    Parameters

    • element: HTMLElement

      HTML element where the whiteboard will be rendered

    • Optional options: StartWhiteboardOptions

      Optional configuration whiteboard

    Returns ExecutedResult | Promise<string>

    Promise that resolves when the whiteboard session starts successfully

  • Start viewing another participant's whiteboard session. Allows the current user to see and interact with a whiteboard being presented by another user. The viewer can see real-time updates and may be able to annotate based on permissions.

    throws

    {INVALID_PARAMETERS} If the specified presenter hasn't started a whiteboard

    throws

    {INVALID_OPERATION} If whiteboard state is invalid

    example
    // Listen for peer whiteboard state changes and automatically join
    client.on('peer-whiteboard-state-change', async (payload) => {
    const { action, userId } = payload;

    if (action === 'Start') {
    // Another user started presenting whiteboard
    await whiteboardClient.startWhiteboardView(whiteboardElement, userId);
    } else if (action === 'Stop') {
    // Presenter stopped sharing whiteboard
    await whiteboardClient.stopWhiteboardView();
    }
    });

    // Or manually view a specific presenter's whiteboard
    const presenter = whiteboardClient.getWhiteboardPresenter();
    if (presenter) {
    await whiteboardClient.startWhiteboardView(whiteboardElement, presenter.userId);
    }
    since

    2.3.5

    Parameters

    • element: HTMLElement

      HTML element where the whiteboard will be rendered

    • presenterId: number

      User ID of the whiteboard presenter to view

    • Optional options: StartWhiteboardOptions

      Optional configuration whiteboard

    Returns ExecutedResult | Promise<string>

    Promise that resolves when successfully joined the whiteboard view

  • Stop the current whiteboard session as the presenter. Only the current presenter can stop their own whiteboard session. Other participants' view will automatically close when the presenter stops.

    example
    await whiteboardClient.stopWhiteboardScreen();
    
    since

    2.3.5

    Returns ExecutedResult | Promise<string>

    Promise that resolves when the whiteboard session stops successfully

  • Stop viewing the current whiteboard session. Disconnects the current user from viewing another participant's whiteboard.

    throws

    {INVALID_OPERATION} If the current user is the presenter (use stopWhiteboardScreen instead)

    example
    await whiteboardClient.stopWhiteboardView();
    
    since

    2.3.5

    Returns ExecutedResult | Promise<string>

    Promise that resolves when successfully stopped viewing the whiteboard