### GNU General Public License - Example Output Source: https://github.com/zoom/meetingsdk-web/blob/master/oss_attribution.txt Example of how a program might display copyright and license information when it starts in interactive mode, as per the GNU GPL. ```plaintext Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. ``` -------------------------------- ### Install the Meeting SDK Source: https://github.com/zoom/meetingsdk-web/blob/master/README.md Install the Meeting SDK using npm. ```bash npm install @zoom/meetingsdk --save ``` -------------------------------- ### Client View (ZoomMtg) Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/README.md Quick start example for integrating Zoom meetings using the Client View approach with ZoomMtg. ```javascript import { ZoomMtg } from '@zoom/meetingsdk' // Step 1: Preload and prepare ZoomMtg.preLoadWasm() ZoomMtg.prepareWebSDK() // Step 2: Initialize ZoomMtg.init({ leaveUrl: 'https://yourapp.com/home', patchJsMedia: true, success: () => { // Step 3: Join meeting ZoomMtg.join({ signature: 'JWT_SIGNATURE', meetingNumber: '123456789', userName: 'John Doe', userEmail: 'john@example.com', passWord: 'meeting_password', success: () => { console.log('Successfully joined meeting') }, error: (error) => { console.error('Failed to join:', error) } }) }, error: (error) => { console.error('Init failed:', error) } }) ``` -------------------------------- ### EmbeddedClient.init() Configuration Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/configuration.md Example of initializing the EmbeddedClient with core options. ```typescript await client.init({ zoomAppRoot: document.getElementById('meetingSDKElement'), language: 'en-US', patchJsMedia: true, customize: { /* ... */ } }) ``` -------------------------------- ### Import and Setup Source: https://github.com/zoom/meetingsdk-web/blob/master/README.md Import the ZoomMtgEmbedded class and create a client instance. ```javascript import ZoomMtgEmbedded from "@zoom/meetingsdk/embedded" const client = ZoomMtgEmbedded.createClient() ``` -------------------------------- ### init() Example Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/ZoomMtg.md Initializes the Zoom Meeting SDK with configuration options. ```javascript import { ZoomMtg } from '@zoom/meetingsdk' ZoomMtg.init({ leaveUrl: 'https://yourapp.com/home', debug: false, patchJsMedia: true, isSupportAV: true, success: () => { console.log('SDK initialized') }, error: (error) => { console.error('Init failed:', error) } }) ``` -------------------------------- ### Video Options for customize Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/configuration.md Example of customizing video-related settings within the `customize` object for EmbeddedClient.init(). ```typescript customize: { video: { popper: { disableDraggable: false, anchorReference: 'anchorEl', anchorElement: null, anchorPosition: { top: 0, left: 0 }, placement: 'top' }, isResizable: true, viewSizes: { ribbon: { width: 300, height: 100 }, default: { width: 800, height: 600 } }, defaultViewType: 'speaker' // minimized, speaker, ribbon, gallery, active } } ``` -------------------------------- ### ZoomMtg.join() Parameters Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/configuration.md Example of joining a meeting using ZoomMtg.join(). ```typescript ZoomMtg.join({ meetingNumber: '123456789', userName: 'John Doe', signature: 'SDK_JWT_SIGNATURE', passWord: 'meeting_password', userEmail: 'john@example.com' }) ``` -------------------------------- ### Event Handling Examples Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/ZoomMtgEmbedded.md Examples demonstrating how to listen for and handle various events from the Zoom Meeting SDK, such as user joining, receiving chat messages, and changes in recording status. ```javascript client.on('user-added', (payload) => { console.log(`${payload.displayName} joined the meeting`) }) client.on('chat-on-message', (payload) => { console.log(`Chat: ${payload.sender.name}: ${payload.message}`) }) client.on('recording-change', (payload) => { console.log('Recording status:', payload) }) ``` -------------------------------- ### Toolbar Customization Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/configuration.md Example of customizing the toolbar with custom buttons for EmbeddedClient.init(). ```typescript customize: { toolbar: { buttons: [ { text: 'Custom Button', onClick: () => { /* ... */ }, className: 'custom-button-class' } ] } } ``` -------------------------------- ### startScreenShare() Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/ZoomMtg.md Starts screen sharing. Check share privilege before calling. ```typescript ZoomMtg.startScreenShare({ broadcastToBreakoutRoom?: boolean hideShareAudioOption?: boolean optimizedForSharedVideo?: boolean sourceId?: string success?: Function error?: Function }): void ``` ```javascript ZoomMtg.startScreenShare({ broadcastToBreakoutRoom: false, optimizedForSharedVideo: false, success: () => { console.log('Screen share started') } }) ``` -------------------------------- ### EmbeddedClient.join() Parameters Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/configuration.md Example of joining a meeting using EmbeddedClient.join(). ```typescript await client.join({ meetingNumber: '123456789', userName: 'John Doe', signature: 'SDK_JWT_SIGNATURE', password: 'meeting_password', userEmail: 'john@example.com' }) ``` -------------------------------- ### Screen Sharing Customization Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/configuration.md Example of customizing screen sharing options for EmbeddedClient.init(). ```typescript customize: { sharing: { options: { hideShareAudioOption: false // Hide audio sharing checkbox (Chrome) } } } ``` -------------------------------- ### join() Example Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/ZoomMtg.md Joins a Zoom meeting or webinar. ```javascript ZoomMtg.join({ meetingNumber: '123456789', userName: 'John Doe', userEmail: 'john@example.com', signature: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...', passWord: 'abc123', success: () => { console.log('Successfully joined meeting') }, error: (error) => { console.error('Join failed:', error) } }) ``` -------------------------------- ### record() Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/ZoomMtg.md Starts or stops cloud recording. Host only. ```typescript ZoomMtg.record({ record: boolean success?: Function error?: Function }): void ``` ```javascript ZoomMtg.record({ record: true, success: () => { console.log('Recording started') } }) ``` -------------------------------- ### Panel Customization Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/configuration.md Example of customizing the positioning of various panels using PopperStyle for EmbeddedClient.init(). ```typescript customize: { participants: { popper: { /* PopperStyle */ } }, setting: { popper: { /* PopperStyle */ } }, invite: { popper: { /* PopperStyle */ } }, callMe: { popper: { /* PopperStyle */ } }, meeting: { popper: { /* PopperStyle */ } }, chat: { notificationCls: { top: '10px', right: '10px' }, popper: { /* PopperStyle */ } }, activeApps: { popper: { /* PopperStyle */ } } } ``` -------------------------------- ### Minimal Client View Initialization Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/configuration.md A basic example of initializing the SDK for the Client View, including joining a meeting. ```javascript import { ZoomMtg } from '@zoom/meetingsdk' ZoomMtg.preLoadWasm() ZoomMtg.prepareWebSDK() ZoomMtg.init({ leaveUrl: 'https://example.com/home', patchJsMedia: true, success: () => { console.log('SDK ready') ZoomMtg.join({ meetingNumber: '123456789', userName: 'John', signature: 'JWT_SIGNATURE', success: () => { console.log('Joined meeting') } }) } }) ``` -------------------------------- ### Component View (ZoomMtgEmbedded) Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/README.md Quick start example for integrating Zoom meetings using the Component View approach with ZoomMtgEmbedded. ```javascript import ZoomMtgEmbedded from '@zoom/meetingsdk/embedded' // Step 1: Create client const client = ZoomMtgEmbedded.createClient() // Step 2: Initialize await client.init({ zoomAppRoot: document.getElementById('meetingContainer'), language: 'en-US', patchJsMedia: true }) // Step 3: Join meeting try { await client.join({ signature: 'JWT_SIGNATURE', meetingNumber: '123456789', userName: 'John Doe', password: 'meeting_password' }) console.log('Successfully joined') } catch (error) { console.error('Join failed:', error) } // Step 4: Listen to events client.on('user-added', (payload) => { console.log(`${payload.displayName} joined`) }) client.on('connection-change', (payload) => { if (payload.state === 'Closed') { console.log('Meeting ended') } }) ``` -------------------------------- ### Zoom for Government Initialization Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/configuration.md Example of initializing the SDK for Zoom for Government, specifying the JS library path and web endpoint. ```javascript ZoomMtg.setZoomJSLib('https://source.zoomgov.com/6.0.2/lib', '/av') ZoomMtg.init({ leaveUrl: 'https://example.com/home', webEndpoint: 'www.zoomgov.com', patchJsMedia: true }) ``` -------------------------------- ### getBreakoutRoomList Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/ZoomMtgEmbedded.md Gets breakout rooms. Host gets all rooms, participant gets assigned room. ```typescript client.getBreakoutRoomList(): Room[] ``` -------------------------------- ### Get Attendees List Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/ZoomMtgEmbedded.md Gets all participants in the meeting. ```javascript const attendees = client.getAttendeeslist() console.log(`${attendees.length} participants in meeting`) ``` -------------------------------- ### ZoomMtg.init() Configuration Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/configuration.md Initialize the SDK with these options: ```typescript ZoomMtg.init({ leaveUrl: 'https://yourapp.com/home', // REQUIRED debug: false, patchJsMedia: true, webEndpoint: 'zoom.us', showMeetingHeader: true, disableInvite: false, // ... more options }) ``` -------------------------------- ### Get Wrapper Translate Source: https://github.com/zoom/meetingsdk-web/blob/master/helper.html Gets the translate value of the Swiper wrapper. ```javascript x.getWrapperTranslate=function(e){return void 0===e&&(e=x.isHorizontal()?( "x"):( "y")),x.getTranslate(x.wrapper[0],e)} ``` -------------------------------- ### Initialization and Configuration Source: https://github.com/zoom/meetingsdk-web/blob/master/helper.html This snippet shows the initialization of the Web SDK helper, parsing query parameters, and setting up configuration for language, URL, and dimensions. It also includes logic for loading and reloading internationalization resources. ```javascript c.i18n=(void 0===window.i18n&&(window.i18n=(0,n.Z)()),window.i18n),c.initWebSDKHelper=function(){var e,t=o.N$.parseQuery(),a={type:t.type,title:"",url:(0,o.Di)(t.url)||"",width:parseInt(t.w||"500",10),height:parseInt(t.h||"400",10),lang:t.lang||"en-US",zoomJSLib:(0,o.Di)(t.zoomJSLib)||""}; (0,i.x8)(a.zoomJSLib),(0,r.LU)(),(0,o.Ox)(),void 0===window.i18n&&(window.i18n=(0,n.Z)()),e&&e instanceof Array&&e.forEach((function(e){(0,r.qk)(e)})),window.i18n.load(a.lang),window.i18n.reload(a.lang),setTimeout((function(){if(e=a.url,/^https:\/\/(\[\\w-\]+\\.)+\[\\w-\]+(\/[\\w- .\\/?%&=\]*)?/i.test(e)&&a.type){var e,t;(function(e){var t=document.createElement("div");t.classList.add("mini-layout");var a=document.createElement("div");a.classList.add("mini-layout-body");var r=document.createElement("div");r.classList.add("page-header");var n=document.createElement("div");n.textContent=(0,o.NN)("Confirm {0}","apac.helper.confirm\_title").format(e.title);var i=document.createElement("div");i.classList.add("form");var l=document.createElement("div");l.classList.add("form-group");var c=document.createElement("div");c.classList.add("controls");var p=document.createElement("p"),u=(0,o.NN)("Confirm","apac.confirm");p.textContent=(0,o.NN)('Click "{0}" to continue. Please remain on this page before completing the process.',"apac.helper.confirm\_desc").format(u);var d=document.createElement("button");d.textContent=u,d.classList.add("login-btn2"),d.classList.add("login-btn2-zoom"),d.id="zoom-websdk-confirm",s(t,a),s(a,r),s(r,n),s(a,i),s(i,l),s(l,c),s(c,p),s(c,d),s(document.getElementById("zmmtg-root-helper"),t)})(a=Object.assign(a,function(e){var t="",a="";switch(e){case"register":t=(0,o.NN)("Registration","apac.registration"),a=(0,o.NN)("Registering","apac.registering");break;case"sign":t=(0,o.NN)("Sign in","apac.sign\_in"),a=(0,o.NN)("Signing in","apac.signing\_in");break;case"captcha":t=(0,o.NN)("ReCAPTCHA","apac.recaptcha"),a=(0,o.NN)("ReCAPTCHA","apac.recaptcha");break;case"sms":t=(0,o.NN)("SMS verification","apac.sms\_verification"),a=(0,o.NN)("SMS verification","apac.sms\_verification");break;default:t="",a=""}return{title:t,text:a}}(a.type))),function(e){var t=document.createElement("div");t.id="loading-layer",t.classList.add("loading-layer"),t.classList.add("loading-layer--reset-webclient"),t.classList.add("hidden");var a=document.createElement("div");a.classList.add("loading-layer\_\_text-field");var r=document.createElement("p");r.classList.add("loading-layer\_\_title"),r.textContent="";var n=document.createElement("p");n.classList.add("loading-layer\_\_text"),n.textContent=e;var i=document.createElement("span");i.classList.add("loading-layer\_\_dot-ani"),s(t,a),s(a,r),s(a,n),s(n,i),s(document.getElementById("zmmtg-root-helper"),t)}(a.text);var r,n="init";document.getElementById("zoom-websdk-confirm").addEventListener("click",(function(){l(!0),n="open",t=function(e,t,a,r,n){var i=window.screenX+(n.width-a)/2,o=window.screenY+(n.height-r)/2;return console.log("width=".concat(a,", height=").concat(r,", top=").concat(o,", left=").concat(i)),window.open(e,t,"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=".concat(a,", height=").concat(r,", top=").concat(o,", left=").concat(i))}(a.url,"zoom register",a.width,a.height,{width:window.innerWidth,height:window.innerHeight}),r=setInterval((function(){t.closed&&"open"===n&&(clearInterval(r),l(!1),n="close")}),500),setTimeout((function(){t.closed||"open"!==n||(l(!1),n="close",t.close())}),6e5)})),window.addEventListener("message",(function(e){var r=e.data,n=(e.origin,r.type?r.type:r);[" ``` -------------------------------- ### Get Translate Source: https://github.com/zoom/meetingsdk-web/blob/master/helper.html Gets the computed translate value (x or y) of an element. ```javascript x.getTranslate=function(e,t){var a,r,n,i;return void 0===t&&(t="x"),x.params.virtualTranslate?x.rtl?-x.translate:x.translate:(n=window.getComputedStyle(e,null),window.WebKitCSSMatrix?((r=n.transform||n.webkitTransform).split(",").length>6&&(r=r.split(", ").map((function(e){return e.replace(",",".")})).join(", ")),i=new window.WebKitCSSMatrix("none"===r?"":r)):a=(i=n.MozTransform||n.OTransform||n.MsTransform||n.msTransform||n.transform||n.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===t&&(r=window.WebKitCSSMatrix?i.m41:16===a.length?parseFloat(a[12]):parseFloat(a[4])),"y"===t&&(r=window.WebKitCSSMatrix?i.m42:16===a.length?parseFloat(a[13]):parseFloat(a[5])),x.rtl&&r&&(r=-r),r||0)} ``` -------------------------------- ### Get Language Translation Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/ZoomMtgEmbedded.md Gets the translation map for a language. ```typescript client.getLanguageTranslation(lng: LanguageOptionType): ExecutedResult ``` -------------------------------- ### Get Current User Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/ZoomMtgEmbedded.md Gets information about the current user. ```javascript const user = client.getCurrentUser() console.log('Current user:', user.userName) ``` -------------------------------- ### Get Bot App Name Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/ZoomMtgEmbedded.md Gets the bot app name. ```typescript client.getBotAppName(): string | null ``` -------------------------------- ### Import and Initialize the SDK Source: https://github.com/zoom/meetingsdk-web/blob/master/README.md Import ZoomMtg and prepare the SDK for use. ```javascript import { ZoomMtg } from '@zoom/meetingsdk' ZoomMtg.preLoadWasm() ZoomMtg.prepareWebSDK() ``` -------------------------------- ### Mutation Observer Setup Source: https://github.com/zoom/meetingsdk-web/blob/master/helper.html Sets up a MutationObserver to watch for changes in the DOM and trigger resize events and observer updates. ```javascript function c(e,t){t=t||{};var a=new(window.MutationObserver||window.WebkitMutationObserver)((function(e){e.forEach((function(e){x.onResize(!0),x.emit("onObserverUpdate",x,e)}))}));a.observe(e,{attributes:void 0===t.attributes||t.attributes,childList:void 0===t.childList||t.childList,characterData:void 0===t.characterData||t.characterData}),x.observers.push(a)} ``` -------------------------------- ### Get Pin List Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/ZoomMtgEmbedded.md Gets the list of pinned user IDs. ```typescript client.getPinList(): number[] ``` -------------------------------- ### Applying GNU GPL to New Programs Source: https://github.com/zoom/meetingsdk-web/blob/master/oss_attribution.txt This snippet shows how to apply the GNU General Public License to new programs, including copyright notices and license terms. ```text Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ``` -------------------------------- ### Customized Component View Initialization Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/configuration.md An example of initializing the SDK for the Component View with custom toolbar buttons, video view settings, and chat notification styles. ```javascript import ZoomMtgEmbedded from '@zoom/meetingsdk/embedded' const client = ZoomMtgEmbedded.createClient() await client.init({ zoomAppRoot: document.getElementById('zoomContainer'), language: 'en-US', patchJsMedia: true, customize: { toolbar: { buttons: [ { text: 'Share File', onClick: () => { console.log('Custom file share clicked') } } ] }, video: { defaultViewType: 'gallery', isResizable: true, viewSizes: { default: { width: 1200, height: 700 } } }, chat: { notificationCls: { bottom: '20px', right: '20px' } } }, maximumVideosInGalleryView: 20 }) await client.join({ meetingNumber: '123456789', userName: 'John Doe', signature: 'JWT_SIGNATURE' }) ``` -------------------------------- ### INTERNAL_ERROR Example Trigger Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/errors.md Example of a trigger for an INTERNAL_ERROR. ```javascript await client.expel(userId) // Zoom server temporarily down ``` -------------------------------- ### INSUFFICIENT_PRIVILEGES Example Trigger Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/errors.md Example of a trigger for an INSUFFICIENT_PRIVILEGES error. ```javascript // Participant attempting to end meeting (host only) await client.endMeeting() // Error: INSUFFICIENT_PRIVILEGES ``` -------------------------------- ### OPERATION_TIMEOUT Example Trigger Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/errors.md Example of a trigger for an OPERATION_TIMEOUT error. ```javascript await client.mute(true, userId) // Operation timed out waiting for response ``` -------------------------------- ### History Module - init Source: https://github.com/zoom/meetingsdk-web/blob/master/helper.html Initializes the history module, enabling URL synchronization with Swiper's slides. ```javascript init:function(){if(x.params.history){if(!window.history||!window.history.pushState)return x.params.history=!1,void(x.params.hashnav=!0);x.history.initialized=!0,this.paths=this.getPathValues(),(this.paths.key||this.paths.value)&&(this.scrollToSlide(0,this.paths.value,x.params.runCallbacksOnInit),x.params.replaceState||window.addEventListener("popstate", ``` -------------------------------- ### Get Authorized Bot List By User ID Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/ZoomMtgEmbedded.md Gets the list of authorized bots for a user. ```typescript client.getAuthorizedBotListByUserId(userId: number): (Participant | null)[] | null ``` -------------------------------- ### Join a Meeting Source: https://github.com/zoom/meetingsdk-web/blob/master/README.md Initialize the SDK and join a meeting with provided parameters. ```javascript 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) } }) ``` -------------------------------- ### Get Bot Authorized User Info By User ID Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/ZoomMtgEmbedded.md Gets bot-authorized user information. ```typescript client.getBotAuthorizedUserInfoByUserId(userId: number): Participant | null ``` -------------------------------- ### Document Ready Initialization Source: https://github.com/zoom/meetingsdk-web/blob/master/helper.html This code snippet shows how to initialize the SDK helper when the document is ready. It checks the document's ready state and either calls `documentReady()` directly or adds an event listener for the `DOMContentLoaded` event. ```javascript documentReady() { ZoomMtg.initWebSDKHelper(); } if (document.readyState !== 'loading') { documentReady(); } else { document.addEventListener('DOMContentLoaded', documentReady); } ``` -------------------------------- ### Core and Module Initialization Source: https://github.com/zoom/meetingsdk-web/blob/master/helper.html These snippets relate to the initialization and structure of the JavaScript core library and modules. ```javascript 5645:function(e){var t=e.exports={version:"2.6.5"};"number"==typeof __e&&(__e=t)},2985:function(e,t,a){var r=a(3816),n=a(5645),i=a(7728),o=a(7234),s=a(741),l=function(e,t,a){var c,p,u,d,f=e&l.F,m=e&l.G,h=e&l.S,g=e&l.P,v=e&l.B,w=m?r:h?r[t]||(r[t]={}):(r[t]||{}).prototype,y=m?n:n[t]||(n[t]={}),b=y.prototype||(y.prototype={});for(c in m&&(a=t),a)u=((p=!f&&w&&void 0!==w[c])?w:a)[c],d=v&&p?s(u,r):g&&"function"==typeof u?s(Function.call,u):u,w&&o(w,c,u,e&l.U),y[c]!=u&&i(y,c,d),g&&b[c]!=u&&(b[c]=u)};r.core=n,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l} ``` -------------------------------- ### Get Far End Camera PTZ Capability Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/ZoomMtgEmbedded.md Gets PTZ capability of a remote user's camera. ```typescript client.getFarEndCameraPTZCapability(userId: number): PTZCameraCapability ``` -------------------------------- ### Initialize and Join Meeting Source: https://github.com/zoom/meetingsdk-web/blob/master/README.md Initialize the SDK with the container element and join a meeting using provided credentials. ```javascript 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) }) ``` -------------------------------- ### Event Attachment for Zoom Source: https://github.com/zoom/meetingsdk-web/blob/master/helper.html Attaches and detaches event listeners for zoom-related gestures and touch events. It handles gesture start, change, end, touch start, move, end, and transition end. ```javascript attachEvents:function(t){var a=t?"off":"on";if(x.params.zoom){var r=("touchstart"!==x.touchEvents.start||!x.support.passiveListener||!x.params.passiveListeners)&&{passive:!0,capture:!1});x.support.gestures?(x.slides\[a\]("gesturestart",x.zoom.onGestureStart,r),x.slides\[a\]("gesturechange",x.zoom.onGestureChange,r),x.slides\[a\]("gestureend",x.zoom.onGestureEnd,r)):"touchstart"===x.touchEvents.start&&(x.slides\[a\](x.touchEvents.start,x.zoom.onGestureStart,r),x.slides\[a\](x.touchEvents.move,x.zoom.onGestureChange,r),x.slides\[a\](x.touchEvents.end,x.zoom.onGestureEnd,r)),x\[a\]("touchStart",x.zoom.onTouchStart),x.slides.each((function(t,r){e(r).find("."+x.params.zoomContainerClass).length>0&&e(r)[a\](x.touchEvents.move,x.zoom.onTouchMove)})),x\[a\]("touchEnd",x.zoom.onTouchEnd),x\[a\]("transitionEnd",x.zoom.onTransitionEnd),x.params.zoomToggle&&x.on("doubleTap",x.zoom.toggleZoom)}},init:function(){x.zoom.attachEvents()},destroy:function(){x.zoom.attachEvents(!0)}} ``` -------------------------------- ### Create Loop Source: https://github.com/zoom/meetingsdk-web/blob/master/helper.html Creates the necessary clones for the loop effect. ```javascript x.createLoop=function(){x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass).remove();var t=x.wrapper.children("."+x.params.slideClass);"auto"!==x.params.slidesPerView||x.params.loopedSlides||(x.params.loopedSlides=t.length),x.loopedSlides=parseInt(x.params.loopedSlides||x.params.slidesPerView,10),x.loopedSlides=x.loopedSlides+x.params.loopAdditionalSlides,x.loopedSlides>t.length&&(x.loopedSlides=t.length);var a,r=[],n=[];for(t.each((function(a,i){var o=e(this);a=t.length-x.loopedSlides&&r.push(i),o.attr("data-swiper-slide-index",a)})),a=0;a=0;a--)x.wrapper.prepend(e(r[a].cloneNode(!0)).addClass(x.params.slideDuplicateClass))} ``` -------------------------------- ### i18n.getAll() Source: https://github.com/zoom/meetingsdk-web/blob/master/_autodocs/api-reference/ZoomMtg.md Gets all translations for a language. ```typescript ZoomMtg.i18n.getAll(lang: string): object ```