跳到正文
cccskills
免费在 GitHub 公开

zoom-meeting-sdk-web-component-view

Embed Zoom meetings inside a chosen area of a web application. This guide covers initialization, joining, layout customization, meeting controls, and event handling, with React examples and asynchronous APIs that let code wait for operations to finish.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Zoom Meeting SDK Web - Component View. Embeddable Zoom meeting components with Promise-based API for flexible integration. Ideal for React/Vue/Angular apps and custom layouts. Uses ZoomMtgEmbedded with async/await patterns and embeddable UI containers.

集成工具Zoom
查看安装方法

适用场景

  • Embedding Zoom meetings in a web application
  • Building a React meeting component
  • Adjusting meeting display size and adding toolbar buttons
  • Responding to participant and connection events

包含的文件(3)

  • SKILL.md14.1 KB
  • references/README.md477 B
  • RUNBOOK.md2.4 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Zoom Meeting SDK Web - Component View

Embeddable Zoom meeting components for flexible integration into any web application. Component View provides Promise-based APIs and customizable UI.

This is the correct web skill for a custom UI around a real Zoom meeting. Do not route to Video SDK unless the user is building a non-meeting custom session product.

Overview

Component View uses ZoomMtgEmbedded.createClient() to create embeddable meeting components within a specific container element.

AspectDetails
API ObjectZoomMtgEmbedded.createClient() (instance)
API StylePromise-based (async/await)
UIEmbeddable in any container
Password parampassword (lowercase)
Eventson()/off()
Best ForCustom layouts, React/Vue/Angular apps

Installation

NPM

npm install @zoom/meetingsdk --save
import ZoomMtgEmbedded from '@zoom/meetingsdk/embedded';

CDN

<script src="https://source.zoom.us/{VERSION}/lib/vendor/react.min.js"></script>
<script src="https://source.zoom.us/{VERSION}/lib/vendor/react-dom.min.js"></script>
<script src="https://source.zoom.us/{VERSION}/lib/vendor/redux.min.js"></script>
<script src="https://source.zoom.us/{VERSION}/lib/vendor/redux-thunk.min.js"></script>
<script src="https://source.zoom.us/{VERSION}/lib/vendor/lodash.min.js"></script>
<script src="https://source.zoom.us/zoom-meeting-embedded-{VERSION}.min.js"></script>

Complete Initialization Flow

import ZoomMtgEmbedded from '@zoom/meetingsdk/embedded';

// Step 1: Create client instance (do once, not on every render!)
const client = ZoomMtgEmbedded.createClient();

async function joinMeeting() {
  try {
    // Step 2: Get container element
    const meetingSDKElement = document.getElementById('meetingSDKElement');

    // Step 3: Initialize client
    await client.init({
      zoomAppRoot: meetingSDKElement,
      language: 'en-US',
      debug: true,
      patchJsMedia: true,
      leaveOnPageUnload: true,
    });

    // Step 4: Join meeting
    await client.join({
      signature: signature,
      sdkKey: sdkKey,
      meetingNumber: meetingNumber,
      userName: userName,
      password: password,  // lowercase!
      userEmail: userEmail,
    });

    console.log('Joined successfully!');
  } catch (error) {
    console.error('Failed to join:', error);
  }
}

client.init() - All Options

Required

ParameterTypeDescription
zoomAppRootHTMLElementContainer element for meeting UI

Display

ParameterTypeDefaultDescription
languagestring'en-US'UI language
debugbooleanfalseEnable debug logging

Media

ParameterTypeDefaultDescription
patchJsMediabooleanfalseAuto-apply media fixes
leaveOnPageUnloadbooleanfalseCleanup on page unload
enableHDbooleantrueEnable 720p video
enableFullHDbooleanfalseEnable 1080p video

Customization

ParameterTypeDescription
customizeobjectUI customization options
webEndpointstringFor ZFG: 'www.zoomgov.com'
assetPathstringCustom path for AV libraries

Customize Object

await client.init({
  zoomAppRoot: element,
  customize: {
    // Meeting info displayed
    meetingInfo: [
      'topic',
      'host', 
      'mn',
      'pwd',
      'telPwd',
      'invite',
      'participant',
      'dc',
      'enctype'
    ],
    
    // Video customization
    video: {
      isResizable: true,
      viewSizes: {
        default: {
          width: 1000,
          height: 600
        },
        ribbon: {
          width: 300,
          height: 700
        }
      },
      popper: {
        disableDraggable: false
      }
    },
    
    // Custom toolbar buttons
    toolbar: {
      buttons: [
        {
          text: 'Custom Button',
          className: 'custom-btn',
          onClick: () => {
            console.log('Custom button clicked');
          }
        }
      ]
    },
    
    // Active speaker indicator
    activeSpaker: {
      strokeColor: '#00FF00'
    }
  }
});

client.join() - All Options

Required

ParameterTypeDescription
signaturestringSDK JWT from backend
sdkKeystringSDK Key / Client ID
meetingNumberstring | numberMeeting number
userNamestringDisplay name

Authentication

ParameterTypeWhen RequiredDescription
passwordstringIf setMeeting password (lowercase!)
zakstringStarting as hostHost's ZAK token
tkstringRegistrationRegistrant token
userEmailstringWebinarsUser email

Event Listeners

Syntax

// Subscribe
client.on('event-name', callback);

// Unsubscribe
client.off('event-name', callback);

Connection Events

client.on('connection-change', (payload) => {
  // payload.state: 'Connecting', 'Connected', 'Reconnecting', 'Closed'
  console.log('Connection state:', payload.state);
  
  if (payload.state === 'Closed') {
    console.log('Reason:', payload.reason);
  }
});

User Events

client.on('user-added', (payload) => {
  // Array of users who joined
  console.log('Users added:', payload);
  payload.forEach(user => {
    console.log('User ID:', user.oderId);
    console.log('Name:', user.displayName);
  });
});

client.on('user-removed', (payload) => {
  // Array of users who left
  console.log('Users removed:', payload);
});

client.on('user-updated', (payload) => {
  // Array of users whose properties changed
  console.log('Users updated:', payload);
});

Audio Events

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

client.on('audio-statistic-data-change', (payload) => {
  console.log('Audio stats:', payload);
});

Video Events

client.on('video-active-change', (payload) => {
  // Video state changed
  console.log('Video active:', payload);
});

client.on('video-statistic-data-change', (payload) => {
  console.log('Video stats:', payload);
});

Share Events

client.on('active-share-change', (payload) => {
  console.log('Share status:', payload);
});

client.on('share-statistic-data-change', (payload) => {
  console.log('Share stats:', payload);
});

Chat Events

client.on('chat-on-message', (payload) => {
  console.log('Chat message:', payload);
});

Recording Events

client.on('recording-change', (payload) => {
  console.log('Recording status:', payload);
});

Media Device Events

client.on('media-sdk-change', (payload) => {
  console.log('Media SDK:', payload);
});

client.on('device-change', () => {
  console.log('Device changed');
});

Common Methods

User Information

// Get current user
const currentUser = client.getCurrentUser();
console.log('Current user:', currentUser);

// Get all participants
const participants = client.getParticipantsList();
console.log('Participants:', participants);

// Check if user is host
const isHost = client.isHost();

Audio Control

// Mute/unmute self
await client.mute(true);  // mute
await client.mute(false); // unmute

// Mute/unmute specific user (host only)
await client.muteAudio(userId, true);

// Mute all (host only)
await client.muteAllAudio(true);

Video Control

// Start/stop video
await client.startVideo();
await client.stopVideo();

// Mute/unmute user's video (host only)
await client.muteVideo(userId, true);

Meeting Control

// Leave meeting
client.leaveMeeting();

// End meeting (host only)
client.endMeeting();

Screen Share

// Start screen share
await client.startShareScreen();

// Stop screen share
await client.stopShareScreen();

Recording

// Start recording (cloud)
await client.startCloudRecording();

// Stop recording
await client.stopCloudRecording();

Virtual Background

// Check support
const isSupported = await client.isSupportVirtualBackground();

// Set virtual background
await client.setVirtualBackground(imageUrl);

// Remove virtual background
await client.removeVirtualBackground();

Rename

// Rename user
await client.rename(userId, 'New Name');

React Integration

Basic Pattern

import { useEffect, useRef, useState, useCallback } from 'react';
import ZoomMtgEmbedded from '@zoom/meetingsdk/embedded';

type ZoomClient = ReturnType<typeof ZoomMtgEmbedded.createClient>;

function ZoomMeeting({ meetingNumber, password, userName }: Props) {
  const clientRef = useRef<ZoomClient | null>(null);
  const containerRef = useRef<HTMLDivElement>(null);
  const [isJoined, setIsJoined] = useState(false);
  const [error, setError] = useState<string | null>(null);

  // Create client once
  useEffect(() => {
    if (!clientRef.current) {
      clientRef.current = ZoomMtgEmbedded.createClient();
    }
  }, []);

  const joinMeeting = useCallback(async () => {
    if (!clientRef.current || !containerRef.current) return;

    try {
      // Get signature from backend
      const { signature, sdkKey } = await fetchSignature(meetingNumber);
      
      await clientRef.current.init({
        zoomAppRoot: containerRef.current,
        language: 'en-US',
        patchJsMedia: true,
        leaveOnPageUnload: true,
      });

      await clientRef.current.join({
        signature,
        sdkKey,
        meetingNumber,
        password,
        userName,
      });

      setIsJoined(true);
    } catch (err) {
      setError(err instanceof Error ? err.message : 'Failed to join');
    }
  }, [meetingNumber, password, userName]);

  return (
    <div>
      <div 
        ref={containerRef} 
        style={{ width: '100%', height: '500px' }} 
      />
      {!isJoined && (
        <button onClick={joinMeeting}>Join Meeting</button>
      )}
      {error && <div className="error">{error}</div>}
    </div>
  );
}

Event Handling in React

useEffect(() => {
  if (!clientRef.current) return;
  
  const handleConnectionChange = (payload: any) => {
    if (payload.state === 'Connected') {
      setIsJoined(true);
    } else if (payload.state === 'Closed') {
      setIsJoined(false);
    }
  };

  const handleUserAdded = (payload: any) => {
    console.log('Users joined:', payload);
  };

  clientRef.current.on('connection-change', handleConnectionChange);
  clientRef.current.on('user-added', handleUserAdded);

  return () => {
    clientRef.current?.off('connection-change', handleConnectionChange);
    clientRef.current?.off('user-added', handleUserAdded);
  };
}, []);

Positioning and Resizing

Initial Size

await client.init({
  zoomAppRoot: element,
  customize: {
    video: {
      viewSizes: {
        default: { width: 1000, height: 600 }
      }
    }
  }
});

Dynamic Resizing

The container element size determines the meeting UI size. To resize:

// Just resize the container
document.getElementById('meetingSDKElement').style.width = '1200px';
document.getElementById('meetingSDKElement').style.height = '800px';

Making it Resizable

customize: {
  video: {
    isResizable: true
  }
}

Supported Features

Component View supports core meeting functionality. Some features from Client View may not be available.

FeatureSupported
Audio/Video✅
Screen Share✅
Chat✅
Virtual Background✅
Breakout Rooms✅
Cloud Recording✅
Closed Captions✅
Live Transcription✅
Waiting Room✅
Gallery View✅
Reactions✅
Raise Hand✅

Contact Zoom Developer Support to request additional features.

Error Handling

try {
  await client.join({
    // ... options
  });
} catch (error) {
  // error.reason contains error code
  // error.message contains description
  
  switch (error.reason) {
    case 'WRONG_MEETING_PASSWORD':
      console.error('Incorrect password');
      break;
    case 'MEETING_NOT_START':
      console.error('Meeting has not started');
      break;
    case 'INVALID_PARAMETERS':
      console.error('Invalid join parameters');
      break;
    default:
      console.error('Join failed:', error.message);
  }
}

Comparison with Client View

FeatureComponent ViewClient View
API StylePromisesCallbacks
Password parampasswordpassWord
ContainerCustom elementAuto #zmmtg-root
UIEmbeddableFull-page
PreloadingNot neededpreLoadWasm()
LanguageInit optioni18n.load()
Eventson()/off()inMeetingServiceListener()

Resources

Operations

  • RUNBOOK.md - 5-minute preflight and debugging checklist.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Review a design or web page against WCAG 2.1 AA, an accessibility standard. Organize findings on contrast, keyboard access, forms, and screen reader behavior, with severity levels and practical recommendations for fixes.

中文简介正在准备中。当前显示英语简介。

  • Review accessibility before design handoff
  • Check text and interface color contrast
  • Review keyboard navigation and focus behavior
anthropics/knowledge-work-plugins3万2026年10月17日 更新

Build a single brief on an existing customer using available sales records, emails, documents, call notes, and internal chat. Understand the current situation, key contacts, recent discussions, and gaps that may need attention.

中文简介正在准备中。当前显示英语简介。

  • Preparing for a meeting with an existing customer
  • Catching up on an account during a handover
  • Reviewing recent discussions and stalled opportunities
anthropics/knowledge-work-plugins3万2026年10月17日 更新

Build or refresh a strategic customer account plan from sales records, emails, and meeting transcripts. Organize goals, stakeholders, growth opportunities, risks, and dated actions into a document, then sync approved highlights to the customer relationship management system.

中文简介正在准备中。当前显示英语简介。

  • Creating a quarterly plan for a key customer
  • Refreshing an existing account plan
  • Reviewing stakeholder coverage and growth opportunities
anthropics/knowledge-work-plugins3万2026年10月17日 更新

Research prospective companies and contacts, check existing customer records, and assess fit against your ideal customer profile. Receive a sourced brief covering recent developments, likely priorities, outreach talking points, and a suggested next step.

中文简介正在准备中。当前显示英语简介。

  • Researching a company before a sales approach
  • Checking existing account records and ownership
  • Assessing fit against your ideal customer profile
anthropics/knowledge-work-plugins3万2026年10月17日 更新

Research sales accounts using Common Room data to summarize company details, buying signals, ownership, and key contacts. Answer specific questions directly or prepare a broader briefing with evidence-based next steps, clearly identifying missing information.

中文简介正在准备中。当前显示英语简介。

  • Prepare a company briefing before a sales conversation
  • Check buying signals and recent account activity
  • Find account owners and key contacts
anthropics/knowledge-work-plugins3万2026年10月17日 更新

Score and group accounts by customer fit and engagement, such as recent contact and open sales opportunities. Identify where to focus sales effort, choose next actions, and spot promising accounts with neglected outreach or missing information.

中文简介正在准备中。当前显示英语简介。

  • Prioritize a portfolio of assigned accounts
  • Find strong-fit accounts that need outreach
  • Identify promising accounts with no recent activity
anthropics/knowledge-work-plugins3万2026年10月17日 更新

查看 anthropics 的全部技能

报告此技能的问题