Maintainers
Pricing
Enterprise
More
More
Documentation
Try Live
Rankings
Install
Blog
Docs7
Ask
New
Add Docs
Zoom Meeting SDK Web
https://github.com/zoom/meetingsdk-web
Admin
Embed the Zoom meeting and webinar experience
Tokens:
193,119
Snippets:
1,751
Trust Score:
8.2
Update:
1 month ago
Context
Chat
Benchmark
61.71
Latest
Show doc for...
Code
Info
Show Results
Tokens:
Raw
Copy
Link
Tokens:
Raw
Copy
Link
### Host participant management example Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-participants.md Example showing a host flow: get attendees list, mute all, expel a participant, and withdraw co-host status. Demonstrates error handling with catch and error callbacks. ```APIDOC ## Host participant management example ### Description Example host flow using getAttendeeslist, mute, expel, and withdrawCoHost methods. ### Methods Used - getAttendeeslist - mute - expel - withdrawCoHost ### Example Code ```ts import { ZoomMtg } from '@zoom/meetingsdk' const res = await ZoomMtg.getAttendeeslist({}).catch((err) => { console.error('failed to list attendees:', err) return [] }) for (const participant of res) { await ZoomMtg.mute({ userId: participant.userId, mute: true, error: (e) => console.warn('could not mute', participant.userId, e), }) } await ZoomMtg.expel({ userId: someUserId }) await ZoomMtg.withdrawCoHost({ userId: someUserId }) ``` ``` -------------------------------- ### ZoomMtg.init with async/await Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-init.md Example of initializing the SDK using async/await syntax. ```ts try { await ZoomMtg.init({ leaveUrl: '/meeting', webEndpoint: 'www.zoomgov.com' }) } catch (error) { console.error('init failed:', error) } ``` -------------------------------- ### ZoomMtg.startScreenShare usage example Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-media.md Starts screen share with optimizedForSharedVideo enabled for locally-stored video files. The error callback logs a failure message. ```typescript await ZoomMtg.startScreenShare({ optimizedForSharedVideo: true, error: (e) => console.error('share failed', e), }) ``` -------------------------------- ### ZoomMtg.init with callbacks Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-init.md Example of initializing the SDK using success and error callbacks. ```ts ZoomMtg.init({ leaveUrl: 'https://yourapp.com/meeting-ended', patchJsMedia: true, success: (success) => console.log('initialized'), error: (error) => console.error('init failed', error), }) ``` -------------------------------- ### ZoomMtg.startScreenShare Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-media.md Starts screen sharing. Check share privilege before starting. If you start screen share, you stop receiving others' shared content. Rate limited to 1 second. ```APIDOC ## ZoomMtg.startScreenShare ### Description Starts screen share. Check share privilege before starting. If you start screen share, you stop receiving others' shared content. `optimizedForSharedVideo: true` is recommended for locally-stored video files (lower CPU use). ### Method Function call ### Endpoint `ZoomMtg.startScreenShare(args)` ### Parameters #### Request Body - **broadcastToBreakoutRoom** (boolean) - Optional - Broadcast to breakout rooms; host/co-host only - **hideShareAudioOption** (boolean) - Optional - Default false: show the "Share Audio" checkbox for Chrome tabs - **optimizedForSharedVideo** (boolean) - Optional - Optimize when sharing a locally-stored video file - **sourceId** (string) - Optional - sourceId of the shared content - **success** (Function) - Optional - Success callback - **error** (Function) - Optional - Error callback ### Request Example ```ts await ZoomMtg.startScreenShare({ optimizedForSharedVideo: true, error: (e) => console.error('share failed', e), }) ``` ### Response #### Success Response No explicit response documented. #### Error Response Error callback receives error object. ``` -------------------------------- ### Pin and spotlight usage example Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-participants.md Example usage of operatePin and getPinList with await. Pins user 123 and retrieves the pin list. ```typescript await ZoomMtg.operatePin({ operate: 'add', userId: 123 }) const pinList: number[] = await ZoomMtg.getPinList({}) ``` -------------------------------- ### mediaCapturePermission and mediaCapture usage example Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-media.md Requests media capture permission and, if allowed, starts media capture. The permission result is received via the onMediaCapturePermissionChange listener. ```typescript await ZoomMtg.mediaCapturePermission({ operate: 'request' }) ZoomMtg.inMeetingServiceListener('onMediaCapturePermissionChange', ({ allow }) => { if (allow) ZoomMtg.mediaCapture({ record: 'start' }) }) ``` -------------------------------- ### Install Zoom Meeting SDK via NPM Source: https://github.com/zoom/meetingsdk-web/blob/master/README.md Use this command to install the Meeting SDK package in your frontend project. ```bash npm install @zoom/meetingsdk --save ``` -------------------------------- ### createBreakoutRoom usage example Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-breakout.md Example of creating breakout rooms with an array of names and the manually allocation pattern. Requires importing BreakoutRoomAllocationPattern from @zoom/meetingsdk. ```typescript await ZoomMtg.createBreakoutRoom({ data: ['Design', 'Backend', 'QA'], pattern: BreakoutRoomAllocationPattern.manually, error: (e) => console.error('create failed', e), }) ``` -------------------------------- ### Get Current User Example Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/embedded-client.md Example usage of the getCurrentUser method to retrieve and log current user details if available. ```ts const user = client.getCurrentUser() if (user) console.log(user.userName, user.audio, user.muted) ``` -------------------------------- ### Full host breakout-room flow example Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-breakout.md Demonstrates the complete workflow for a host to create, open, manage, and close breakout rooms. ```ts import { ZoomMtg } from '@zoom/meetingsdk' await ZoomMtg.createBreakoutRoom({ data: ['A', 'B'] }) await ZoomMtg.openBreakoutRooms({ options: { isAutoJoinRoom: true, isTimerEnabled: true, timerDuration: 900 }, }) const rooms = await ZoomMtg.getBreakoutRooms({}) // rooms[0].boId ... await ZoomMtg.assignUserToBreakoutRoom({ userId: 42, targetRoomId: rooms[0].boId }) await ZoomMtg.broadcast({ content: 'Ten minutes remaining' }) await ZoomMtg.closeBreakoutRooms({}) ``` -------------------------------- ### ZoomMtg.prepareWebSDK usage Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-init.md Example of preloading Wasm and preparing the Web SDK. Official usage typically passes no arguments. ```ts ZoomMtg.preLoadWasm() ZoomMtg.prepareWebSDK() ``` -------------------------------- ### Import and Initialize ZoomMtgEmbedded Client Source: https://github.com/zoom/meetingsdk-web/blob/master/README.md Import the ZoomMtgEmbedded module and create a client instance to begin the SDK setup. ```js import ZoomMtgEmbedded from "@zoom/meetingsdk/embedded" const client = ZoomMtgEmbedded.createClient() ``` -------------------------------- ### Full Host Breakout-Room Flow Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-breakout.md Example flow showing how to create, open, assign users, broadcast, and close breakout rooms. ```APIDOC ## Example — full host breakout-room flow ### Description Demonstrates a complete host workflow for managing breakout rooms. ### Code Example ```ts import { ZoomMtg } from '@zoom/meetingsdk' await ZoomMtg.createBreakoutRoom({ data: ['A', 'B'] }) await ZoomMtg.openBreakoutRooms({ options: { isAutoJoinRoom: true, isTimerEnabled: true, timerDuration: 900 }, }) const rooms = await ZoomMtg.getBreakoutRooms({}) // rooms[0].boId ... await ZoomMtg.assignUserToBreakoutRoom({ userId: 42, targetRoomId: rooms[0].boId }) await ZoomMtg.broadcast({ content: 'Ten minutes remaining' }) await ZoomMtg.closeBreakoutRooms({}) ``` ``` -------------------------------- ### ZoomMtg.setZoomJSLib usage Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-init.md Example of setting the library path and directory. This must be called before init. ```ts ZoomMtg.setZoomJSLib('https://source.zoom.us/6.5.0/lib', '/av') ``` -------------------------------- ### Host flow participant management example Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-participants.md Demonstrates a host workflow to list attendees, mute them with error handling, expel a user, and withdraw co-host status. ```ts import { ZoomMtg } from '@zoom/meetingsdk' const res = await ZoomMtg.getAttendeeslist({}).catch((err) => { console.error('failed to list attendees:', err) return [] }) for (const participant of res) { await ZoomMtg.mute({ userId: participant.userId, mute: true, error: (e) => console.warn('could not mute', participant.userId, e), }) } await ZoomMtg.expel({ userId: someUserId }) await ZoomMtg.withdrawCoHost({ userId: someUserId }) ``` -------------------------------- ### Call isSupportVirtualBackground Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-virtual-background.md Example call to isSupportVirtualBackground with a success callback that logs the vb support flag. ```ts ZoomMtg.isSupportVirtualBackground({ success: ({ result }) => console.log('vb supported:', result.vb), }) ``` -------------------------------- ### ZoomMtg.join with Async/Await Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-init.md Example of calling ZoomMtg.join using the Promise-based approach with async/await. ```js try { const res = await ZoomMtg.join({ signature, meetingNumber: 1234567890, userName: 'Ada', passWord: '', recordingToken, }) } catch (err) { console.error('rejected:', err) } ``` -------------------------------- ### subscribeStatisticData usage example Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-media.md Subscribes to audio and video QoS data and sets up a listener for onAudioQos events. ```typescript await ZoomMtg.subscribeStatisticData({ audio: true, video: true, share: false }) ZoomMtg.inMeetingServiceListener('onAudioQos', (data) => console.log('audio qos', data)) ``` -------------------------------- ### ZoomMtg.shareSource usage example Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-media.md Registers a callback that retrieves desktop sources from Electron and passes it to shareSource. Logs success or error. ```typescript const getVideoSources = async () => { const result = await window.electron.getSources() return result } await ZoomMtg.shareSource({ getVideoSourcesCallBack: getVideoSources, success: () => console.log('shareSource registered'), error: (e) => console.error(e), }) ``` -------------------------------- ### Subscribe to 'onUserJoin' event Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-listeners.md Example of registering a listener for the 'onUserJoin' event. The callback receives participant data and logs it to the console. ```ts ZoomMtg.inMeetingServiceListener('onUserJoin', (data) => { console.log('user joined', data) }) ``` -------------------------------- ### Initialize and Join a Meeting in Client View Source: https://github.com/zoom/meetingsdk-web/blob/master/README.md Initialize the SDK with a leave URL and join a meeting using required parameters like signature, meeting number, and user credentials. ```js ZoomMtg.init({ leaveUrl: 'https://yourapp.com/meeting-ended', patchJsMedia: true, success: (success) => { console.log('SDK initialized successfully') ZoomMtg.join({ signature: signature, meetingNumber: meetingNumber, userName: userName, userEmail: userEmail, passWord: passWord, success: (success) => { console.log('Joined meeting successfully') }, error: (error) => { console.error('Failed to join meeting:', error) } }) }, error: (error) => { console.error('Failed to initialize SDK:', error) } }) ``` -------------------------------- ### Initialize and Join with Async/Await Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/embedded-client.md Initialize the SDK and join a meeting using async/await syntax. ```ts try { await client.init({ zoomAppRoot: el }) await client.join({ signature, meetingNumber: '1234567890', userName: 'Ada' }) } catch (err) { console.error(err) // ExecutedFailure } ``` -------------------------------- ### ZoomMtg.sendChat usage examples Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-invite.md Examples of sending chat messages to all and to waiting room. ```typescript await ZoomMtg.sendChat({ userId: 0, message: 'Hello everyone', error: (e) => console.error('send failed', e), }) await ZoomMtg.sendChat({ userId: 4, message: 'We will start shortly' }) ``` -------------------------------- ### client.init(args: InitOptions) Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/embedded-client.md Initializes the embedded client with the given options. The `zoomAppRoot` is required and specifies the DOM element the SDK renders into. The container stays hidden until join is called. ```APIDOC ## [METHOD] client.init(args: InitOptions) ### Description Initializes the embedded client with the given options. The `zoomAppRoot` is required and specifies the DOM element the SDK renders into. The container stays hidden until join is called. ### Method init ### Endpoint client.init(args: InitOptions) ### Parameters #### Request Body - **zoomAppRoot** (HTMLElement) - Required - The DOM element the SDK renders into - **language** (string) - Optional - Language code (e.g., 'en-US') - **assetPath** (string) - Optional - Path to SDK assets - **webEndpoint** (string) - Optional - Web endpoint URL - **patchJsMedia** (boolean) - Optional - Whether to patch JS media - **customize** (object) - Optional - Customization options ### Request Example ```ts client.init({ zoomAppRoot: meetingSDKElement, language: 'en-US', patchJsMedia: true, }) ``` ### Response #### Success Response - **ExecutedResult** (Promise<string | ExecutedFailure>) - Resolves to '' on success #### Response Example ```ts client.init({ zoomAppRoot: el }).then(() => { console.log('initialized') }) ``` ``` -------------------------------- ### Import and Initialize Zoom Meeting SDK Source: https://github.com/zoom/meetingsdk-web/blob/master/README.md Prepare the SDK by importing ZoomMtg and calling the pre-load and preparation methods. ```js import { ZoomMtg } from '@zoom/meetingsdk' ZoomMtg.preLoadWasm() ZoomMtg.prepareWebSDK() ``` -------------------------------- ### ZoomMtg.callOut usage example Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-invite.md Example of calling callOut with options and error handling. ```typescript await ZoomMtg.callOut({ userName: 'Work Phone', phoneNumber: '+15553456789', options: { greeting: true, pressingOne: true }, error: (e) => console.error('call out failed', e), }) ``` -------------------------------- ### ZoomMtg.leaveMeeting usage example Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-meeting-control.md Example call to leaveMeeting with confirm dialog and cancel callback. ```typescript await ZoomMtg.leaveMeeting({ confirm: true, cancelCallback: () => console.log('stay') }) ``` -------------------------------- ### Configure VB at runtime Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-virtual-background.md Complete example of configuring virtual background at runtime: check support, register images, apply, and monitor changes via onVbStatusChange. ```ts import { ZoomMtg } from '@zoom/meetingsdk' // 1. check support const { result } = await ZoomMtg.isSupportVirtualBackground({}) if (result.vb && result.enable) { // 2. register images await ZoomMtg.updateVirtualBackgroundList({ vbList: [ { id: 'beach', displayName: 'Beach', fileName: 'beach.jpg', url: 'https://cdn.example.com/beach.jpg' }, ], }) // 3. apply await ZoomMtg.setVirtualBackground({ id: 'beach' }) // 4. monitor changes made through the in-meeting UI ZoomMtg.inMeetingServiceListener('onVbStatusChange', (data) => { console.log('VB status changed', data) }) } ``` -------------------------------- ### get function declaration Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-i18n.md TypeScript declaration for the get method, which looks up a translation key. ```typescript function get(key: string): void; ``` -------------------------------- ### Initialize and Join Meeting Source: https://github.com/zoom/meetingsdk-web/blob/master/README.md Initialize the SDK with the root element and join a meeting using the required authentication and meeting parameters. ```js const meetingSDKElement = document.getElementById('meetingSDKElement') client.init({ zoomAppRoot: meetingSDKElement, language: 'en-US', patchJsMedia: true }).then(() => { console.log('SDK initialized successfully') client.join({ signature: signature, meetingNumber: meetingNumber, password: password, userName: userName, userEmail: userEmail }).then(() => { console.log('Joined meeting successfully') }).catch((error) => { console.error('Failed to join meeting:', error) }) }).catch((error) => { console.error('Failed to initialize SDK:', error) }) ``` -------------------------------- ### Initialize and Join with Promises Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/embedded-client.md Initialize the SDK and join a meeting using promise chaining. ```ts const client = ZoomMtgEmbedded.createClient() const meetingSDKElement = document.getElementById('meetingSDKElement') client.init({ zoomAppRoot: meetingSDKElement, language: 'en-US', patchJsMedia: true, }).then(() => { return client.join({ signature, meetingNumber, password, userName, userEmail, }) }).then(() => { console.log('joined') }).catch((error) => { console.error('init/join failed', error) }) ``` -------------------------------- ### Translation usage example Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/embedded-client.md Example calls to getLanguageTranslation and updateLanguageTranslation on the client instance. The update call passes a custom dictionary with key-value pairs. ```TypeScript await client.getLanguageTranslation('en-US') await client.updateLanguageTranslation('en-US', { 'key1': 'value1' }) ``` -------------------------------- ### ZoomMtg.joinTest usage example Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-init.md A basic implementation example for calling ZoomMtg.joinTest. Note that the JWT SDK signature only supports role=0 and there is a 10-second rate limit. ```ts await ZoomMtg.joinTest({ meetingNumber, userName: 'QA Tester', signature }) ``` -------------------------------- ### ZoomMtg.focusMode - Enable/Disable Focus Mode Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-meeting-control.md Starts or stops focus mode (host/co-host only). Pass enable: true to start, false to stop. Rate limited to 5 seconds between calls. ```typescript function focusMode(args: { enable: boolean; // true starts focus mode, false stops it success?: Function; error?: Function; }): void | Promise<any>; ``` -------------------------------- ### get Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-i18n.md Looks up a translation key in the dictionary. ```APIDOC ## `get` ### Description Looks up a translation key in the dictionary. If a translation is not found, returns the original word. ### Method `get` ### Parameters - **key** (`string`) - Required - The translation key to look up. ### Returns `void` (per source declaration) ``` -------------------------------- ### Full client-view session lifecycle with ZoomMtg Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-meeting-control.md Use this snippet to run a complete client-view meeting session: preload WebAssembly, prepare the SDK, initialize with a leave URL, join with credentials, and perform mid-meeting controls (record, lock, leave). The record call logs an error if recording cannot start. ```TypeScript import { ZoomMtg } from '@zoom/meetingsdk' ZoomMtg.preLoadWasm() ZoomMtg.prepareWebSDK() await ZoomMtg.init({ leaveUrl: 'https://yourapp.com/post-meeting' }) await ZoomMtg.join({ signature, meetingNumber, userName, passWord }) // mid-meeting control await ZoomMtg.record({ record: true, error: (e) => console.error('cannot record', e) }) await ZoomMtg.lockMeeting({ lockMeeting: true }) await ZoomMtg.leaveMeeting({ confirm: false }) ``` -------------------------------- ### ZoomMtg.askForHelp Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-breakout.md Asks the host to join the breakout room to help. Only a non-host/non-co-host can call this. ```APIDOC ## ZoomMtg.askForHelp ### Description Asks the host to join the breakout room to help. Only a non-host/non-co-host can call this. ### Method Function call ### Endpoint `ZoomMtg.askForHelp(args)` ### Parameters #### Arguments - **success** (Function) - Optional - Callback on success. - **error** (Function) - Optional - Callback on error. ### Request Example ```ts ZoomMtg.askForHelp({ success: () => console.log('Help requested'), error: (e) => console.error(e) }); ``` ### Response #### Success Response No specific response data documented. ``` -------------------------------- ### ZoomMtg.startScreenShare type definition Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-media.md Type definition for startScreenShare. Check share privilege before starting. Starting screen share stops receiving others' shared content. optimizedForSharedVideo is recommended for locally-stored video files. Rate limited to 1 second. ```typescript function startScreenShare(args: { broadcastToBreakoutRoom?: boolean; // broadcast to breakout rooms; host/co-host only hideShareAudioOption?: boolean; // default false: show the "Share Audio" checkbox for Chrome tabs optimizedForSharedVideo?: boolean; // optimize when sharing a locally-stored video file sourceId?: string; // sourceId of the shared content success?: Function; error?: Function; }); ``` -------------------------------- ### String Trim Helper Source: https://github.com/zoom/meetingsdk-web/blob/master/helper.html Trims whitespace from the start of a string. ```javascript 75488(e, t, a) { "use strict"; a.d(t, { A: () => r }); var n = a(7880), o = /^\s+/; const r = function (e) { return e ? e.slice(0, (0, n.A)(e) + 1).replace(o, "") : e } } ``` -------------------------------- ### getBreakoutRoomStatus(): BreakoutRoomStatus Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/embedded-client.md Gets the current breakout room status. ```APIDOC ## getBreakoutRoomStatus(): BreakoutRoomStatus ### Description Gets the current breakout room status. ### Method Function call ### Parameters None ### Returns BreakoutRoomStatus ``` -------------------------------- ### getBreakoutRoomOptions(): RoomOption Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/embedded-client.md Gets the current breakout room options. ```APIDOC ## getBreakoutRoomOptions(): RoomOption ### Description Gets the current breakout room options. ### Method Function call ### Parameters None ### Returns RoomOption ``` -------------------------------- ### client.init(InitOptions) Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/configuration.md Initializes the Zoom Meeting SDK Component View. Accepts an options object analogous to the Client View initArgs, with the same configuration surfaces. ```APIDOC ## client.init(InitOptions) ### Description Initializes the Zoom Meeting SDK Component View with the provided configuration options. This method is used in the Component View context and accepts the same configuration options as the Client View `ZoomMtg.init(initArgs)`. ### Method - init (JavaScript function) ### Endpoint `client.init(InitOptions)` ### Parameters #### InitOptions (object) The configuration options are identical to those described for `ZoomMtg.init(initArgs)`. Refer to the Client View section for the full list of options, defaults, and descriptions. ### Usage Example ```javascript const client = ZoomMtg.createClient(); client.init({ leaveUrl: 'https://example.com', debug: true, webEndpoint: 'www.zoomgov.com', defaultView: 'speaker' }); ``` ``` -------------------------------- ### Hash Map Get Source: https://github.com/zoom/meetingsdk-web/blob/master/helper.html Retrieves a value from the hash map by key. ```javascript 78417(e, t, a) { "use strict"; a.d(t, { A: () => r }); var n = a(20674), o = Object.prototype.hasOwnProperty; const r = function (e) { var t = this.__data__; if (n.A) { var a = t[e]; return "__lodash_hash_undefined__" === a ? void 0 : a } return o.call(t, e) ? t[e] : void 0 } } ``` -------------------------------- ### Get All Symbols Source: https://github.com/zoom/meetingsdk-web/blob/master/helper.html Recursively retrieves all symbols from an object and its prototype chain. ```javascript 83511(e, t, a) { "use strict"; a.d(t, { A: () => s }); var n = a(76912), o = a(15647), r = a(14792), i = a(13153); const s = Object.getOwnPropertySymbols ? function (e) { for (var t = []; e;)(0, n.A)(t, (0, r.A)(e)), e = (0, o.A)(e); return t } : i.A } ``` -------------------------------- ### Module Export 37034 Source: https://github.com/zoom/meetingsdk-web/blob/master/helper.html Slices an array with optional start and end indices. ```javascript 37034(e, t, a) { "use strict"; a.d(t, { A: () => i }); var n = a(37688), o = a(6832), r = a(18593); const i = function (e, t, a) { var i = null == e ? 0 : e.length; return i ? (a && "number" != typeof a && (0, o.A)(e, t, a) ? (t = 0, a = i) : (t = null == t ? 0 : (0, r.A)(t), a = void 0 === a ? i : (0, r.A)(a)), (0, n.A)(e, t, a)) : [] } } ``` -------------------------------- ### Library Entry Point Source: https://github.com/zoom/meetingsdk-web/blob/master/helper.html Exports all public-facing components, hooks, and utility functions for the library. ```javascript 78291(e, t, a) { "use strict"; a.r(t), a.d(t, { I18nContext: () => h.gJ, I18nextProvider: () => c.x, Trans: () => n.x, TransWithoutContext: () => o.x, Translation: () => s.w, composeInitialProps: () => h.rz, date: () => m, getDefaults: () => d.r, getI18n: () => _.T, getInitialProps: () => h.Dz, initReactI18next: () => u.r, number: () => f, plural: () => v, select: () => w, selectOrdinal: () => b, setDefaults: () => d.P, setI18n: () => _.V, time: () => g, useSSR: () => p.a, useTranslation: () => r.B, withSSR: () => l.d, withTranslation: () => i.C }); var n = a(87829), o = a(54814), r = a(78437), i = a(72648), s = a(92176), c = a(33273), l = a(93227), p = a(67674), u = a(51831), d = a(17565), _ = a(8484), h = a(81352); const m = () => "", g = () => "", f = () => "", w = () => "", v = () => "", b = () => "" } ``` -------------------------------- ### Array Slice Helper Source: https://github.com/zoom/meetingsdk-web/blob/master/helper.html Creates a slice of an array from start to end index. ```javascript 37688(e, t, a) { "use strict"; a.d(t, { A: () => n }); const n = function (e, t, a) { var n = -1, o = e.length; t < 0 && (t = -t > o ? 0 : o + t), (a = a > o ? o : a) < 0 && (a += o), o = t > a ? 0 : a - t >>> 0, t >>>= 0; for (var r = Array(o); ++n < o;)r[n] = e[n + t]; return r } } ``` -------------------------------- ### Initialize EmbeddedClient Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/embedded-events.md Import the ZoomMtgEmbedded module and create a client instance to begin using event listeners. ```ts import ZoomMtgEmbedded from '@zoom/meetingsdk/embedded' const client = ZoomMtgEmbedded.createClient() ``` -------------------------------- ### ZoomMtg.getFocusModeStatus Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-meeting-control.md Gets the current focus-mode status. Mirror it with the 'onFocusModeStatusChange' event listener. ```APIDOC ## `ZoomMtg.getFocusModeStatus` ### Description Gets the current focus-mode status. Mirror it with the 'onFocusModeStatusChange' event listener. ### Method Function call ### Signature ts function getFocusModeStatus(args: { success?: Function; error?: Function; }): void | Promise<any>; ### Parameters - **success** (Function) - Optional - Callback on success - **error** (Function) - Optional - Callback on error ### Returns `void | Promise<any>` ``` -------------------------------- ### Configure ZFG Endpoints for Client View Source: https://github.com/zoom/meetingsdk-web/blob/master/README.md Set the Zoom JS library path and initialize the client with the ZFG web endpoint. ```js ZoomMtg.setZoomJSLib("https://source.zoomgov.com/{VERSION}/lib", "/av") ZoomMtg.init({ webEndpoint: "www.zoomgov.com", // ... other options }) ``` -------------------------------- ### Create and Destroy Client Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/embedded-client.md Instantiate the client singleton and destroy it when no longer needed. ```ts const client = ZoomMtgEmbedded.createClient() // later: ZoomMtgEmbedded.destroyClient() ``` -------------------------------- ### getCurrentBreakoutRoom(): Record<string, any> Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/embedded-client.md Gets the current breakout room information for the participant. ```APIDOC ## getCurrentBreakoutRoom(): Record<string, any> ### Description Gets the current breakout room information. ### Method Function call ### Parameters None ### Returns Record<string, any> ``` -------------------------------- ### Backend Service Implementation Source: https://github.com/zoom/meetingsdk-web/blob/master/helper.html The core backend class handles initialization, configuration of load paths, and request management for i18next translations. ```javascript "symbol" == typeof Symbol.iterator ? function (e) { return typeof e } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e }, r(e) } function i(e, t) { var a = Object.keys(e); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); t && (n = n.filter(function (t) { return Object.getOwnPropertyDescriptor(e, t).enumerable })), a.push.apply(a, n) } return a } function s(e) { for (var t = 1; t < arguments.length; t++) { var a = null != arguments[t] ? arguments[t] : {}; t % 2 ? i(Object(a), !0).forEach(function (t) { l(e, t, a[t]) }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(a)) : i(Object(a)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(a, t)) }) } return e } function c(e, t) { for (var a = 0; a < t.length; a++) { var n = t[a]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, p(n.key), n) } } function l(e, t, a) { return (t = p(t)) in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = a, e } function p(e) { var t = function (e) { if ("object" != r(e) || !e) return e; var t = e[Symbol.toPrimitive]; if (void 0 !== t) { var a = t.call(e, "string"); if ("object" != r(a)) return a; throw new TypeError("@@toPrimitive must return a primitive value.") } return String(e) }(e); return "symbol" == r(t) ? t : t + "" } var u = function () { return e = function e(t) { var a = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}; !function (e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e), this.services = t, this.options = a, this.allOptions = n, this.type = "backend", this.init(t, a, n) }, t = [{ key: "init", value: function (e) { var t = this, a = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}; if (this.services = e, this.options = s(s(s({}, { loadPath: "/locales/{{lng}}/{{ns}}.json", addPath: "/locales/add/{{lng}}/{{ns}}", parse: function (e) { return JSON.parse(e) }, stringify: JSON.stringify, parsePayload: function (e, t, a) { return l({}, t, a || "") }, parseLoadPayload: function (e, t) { }, request: o.A, reloadInterval: "undefined" == typeof window && 36e5, customHeaders: {}, queryStringParams: {}, crossDomain: !1, withCredentials: !1, overrideMimeType: !1, requestOptions: { mode: "cors", credentials: "same-origin", cache: "default" } }), this.options || {}), a), this.allOptions = n, this.services && this.options.reloadInterval) { var i = setInterval(function () { return t.reload() }, this.options.reloadInterval); "object" === r(i) && "function" == typeof i.unref && i.unref() } } }, { key: "readMulti", value: function (e, t, a) { this._readAny(e, e, t, t, a) } }, { key: "read", value: function (e, t, a) { this._readAny([e], e, [t], t, a) } }, { key: "_readAny", value: function (e, t, a, o, r) { var i = this, s = this.options.loadPath; "function" == typeof this.options.loadPath && (s = this.options.loadPath(e, a)), (s = (0, n.uW)(s)).then(function (s) { if (!s) return r(null, {}); var c = (0, n.JG)(s, { lng: e.join("+"), ns: a.join("+") }); if (null == c) { var l = e.map(n.Lr).join(", "), p = a.map(n.Lr).join(", "); return r(new Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=[" + l + "] namespaces=[" + p + "]"), !1) } i.loadUrl(c, r, t, o) }) } }, { key: "loadUrl", value: function (e, t, a, o) { var r = this, i = "string" == typeof a ? [a] : a, s = "string" == typeof o ? [o] : o, c = this.options.parseLoadPayload(i, s), l = (0, n.Lr)((0, n.dE)(e)); this.options.request(this.options, e, c, function (e, i) { if (i && (i.status >= 500 && i.status < 600 || !i.status)) return t("failed loading " + l + "; status code: " + i.status, !0); if (i && i.status >= 400 && i.status < 500) return t("failed loading " + l + "; status code: " + i.status, !1); if (!i && e && e.message) { var s = e.message.toLowerCase(); if (["failed", "fetch", "network", "load"].find(function (e) { return s.indexOf(e) > -1 })) return t("failed loading " + l + ": " + (0, n.Lr)(e.message), !0) } if (e) return t(e, !1); var c, p; try { c = "string" == typeof i.data ? r.options.parse(i.data, a, o) : i.data } catch (e) { p = "failed parsing " + l + " to json" } if (p) return t(p, !1); t(null, c) }) } }, { key: "create", value: function (e, t, a, o, r) { var i = this; if (this.options.addPath) { "string" == typeof e && (e = [e]); var s = this.options.parsePayload(t, a, o), c = 0, l = [], p = []; e.forEach(function (a) { var o = i.options.addPath; "function" == typeof i.options.addPath && (o = i.options.addPath(a, t)); var u = ``` -------------------------------- ### ZoomMtg.getUserStatus Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-breakout.md Synchronous method to get the current breakout room attendee status. ```APIDOC ## `ZoomMtg.getUserStatus` ### Description Synchronously returns the attendee's breakout room status. ### Method Function call ### Signature ```ts function getUserStatus(args: { success?: Function; error?: Function; }): BreakoutRoomAttendeeStatus; ``` ### Parameters - **args** (object) - Optional - An object containing optional `success` and `error` callback functions. ### Returns - **BreakoutRoomAttendeeStatus** - The attendee's status, one of `'initial' | 'be invited' | 'joining' | 'in room' | 'returning' | 'not joined' | 'time up' | 'main session'`. ``` -------------------------------- ### ZoomMtg.getVirtualBackgroundStatus declaration Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/zoommtg-virtual-background.md TypeScript declaration for ZoomMtg.getVirtualBackgroundStatus. Gets the current VB status. ```ts function getVirtualBackgroundStatus(args: { success?: typeof vbStatusDataFunc | Function; error?: Function; }): void | Promise<any>; function getVirtualBackgroundStatus(args?: {}): Promise<any>; ``` -------------------------------- ### Range Generation Utility Source: https://github.com/zoom/meetingsdk-web/blob/master/helper.html Creates an array of numbers progressing from start up to, but not including, end. ```javascript 64071(e, t, a) { "use strict"; a.d(t, { A: () => i }); var n = a(58839), o = a(6832), r = a(8776); const i = function (e) { return function (t, a, i) { return i && "number" != typeof i && (0, o.A)(t, a, i) && (a = i = void 0), t = (0, r.A)(t), void 0 === a ? (a = t, t = 0) : a = (0, r.A)(a), i = void 0 === i ? t < a ? 1 : -1 : (0, r.A)(i), (0, n.A)(t, a, i, e) } } } ``` -------------------------------- ### i18next Instance Methods Source: https://github.com/zoom/meetingsdk-web/blob/master/helper.html Methods for managing i18next instances, including loading namespaces, languages, and handling instance cloning. ```javascript r.keyPrefix ? `${r.keyPrefix}${s}${e}` : e), this.t(c, r) }; return t(e) ? o.lng = e : o.lngs = e, o.ns = a, o.keyPrefix = n, o } t(...e) { return this.translator?.translate(...e) } exists(...e) { return this.translator?.exists(...e) } setDefaultNamespace(e) { this.options.defaultNS = e } hasLoadedNamespace(e, t = {}) { if (!this.isInitialized) return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1; if (!this.languages || !this.languages.length) return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1; const a = t.lng || this.resolvedLanguage || this.languages[0], n = !!this.options && this.options.fallbackLng, o = this.languages[this.languages.length - 1]; if ("cimode" === a.toLowerCase()) return !0; const r = (e, t) => { const a = this.services.backendConnector.state[`${e}|${t}`]; return -1 === a || 0 === a || 2 === a }; if (t.precheck) { const e = t.precheck(this, r); if (void 0 !== e) return e } return !(!this.hasResourceBundle(a, e) && this.services.backendConnector.backend && (!this.options.resources || this.options.partialBundledLanguages) && (!r(a, e) || n && !r(o, e))) } loadNamespaces(e, n) { const o = a(); return this.options.ns ? (t(e) && (e = [e]), e.forEach(e => { this.options.ns.indexOf(e) < 0 && this.options.ns.push(e) }), this.loadResources(e => { o.resolve(), n && n(e) }), o) : (n && n(), Promise.resolve()) } loadLanguages(e, n) { const o = a(); t(e) && (e = [e]); const r = this.options.preload || [], i = e.filter(e => r.indexOf(e) < 0 && this.services.languageUtils.isSupportedCode(e)); return i.length ? (this.options.preload = r.concat(i), this.loadResources(e => { o.resolve(), n && n(e) }), o) : (n && n(), Promise.resolve()) } dir(e) { if (e || (e = this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language)), !e) return "rtl"; try { const t = new Intl.Locale(e); if (t && t.getTextInfo) { const e = t.getTextInfo(); if (e && e.direction) return e.direction } } catch (e) { } const t = this.services?.languageUtils || new P(z()); return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"].indexOf(t.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr" } static createInstance(e = {}, t) { const a = new F(e, t); return a.createInstance = F.createInstance, a } cloneInstance(e = {}, t = Y) { const a = e.forkResourceStore; a && delete e.forkResourceStore; const n = { ...this.options, ...e, isClone: !0 }, o = new F(n); if (void 0 === e.debug && void 0 === e.prefix || (o.logger = o.logger.clone(e)), ["store", "services", "language"].forEach(e => { o[e] = this[e] }), o.services = { ...this.services }, o.services.utils = { hasLoadedNamespace: o.hasLoadedNamespace.bind(o) }, a) { const e = Object.keys(this.store.data).reduce((e, t) => (e[t] = { ...this.store.data[t] }, e[t] = Object.keys(e[t]).reduce((a, n) => (a[n] = { ...e[t][n] }, a), e[t]), e), {}); o.store = new y(e, n), o.services.resourceStore = o.store } if (e.interpolation) { const t = { ...z().interpolation, ...this.options.interpolation, ...e.interpolation }, a = { ...n, interpolation: t }; o.services.interpolator = new M(a) } return o.translator = new T(o.services, n), o.translator.on("*", (e, ...t) => { o.emit(e, ...t) }), o.init(n, t), o.translator.options = n, o.translator.backendConnector.services.utils = { hasLoadedNamespace: o.hasLoadedNamespace.bind(o) }, o } toJSON() { return { options: this.options, store: this.store, language: this.language, languages: this.languages, resolvedLanguage: this.resolvedLanguage } } } const V = F.createInstance(); V.keyFromSelector = x, e.exports = V ```