@zoom/videosdk-ui-toolkit 1.8.9 → 1.8.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -54,32 +54,34 @@ To preview your local camera, microphone, and speaker, render the following HTML
54
54
 
55
55
  ### Join Session
56
56
 
57
- To join a Video SDK session, create your Video SDK config object, with your [Video SDK session info](https://developers.zoom.us/docs/video-sdk/web/sessions/#prerequisites), [Video SDK JWT](https://developers.zoom.us/docs/video-sdk/auth/), and features you want to render:
57
+ To join a Video SDK session, add the following HTML element to where you want the UI Toolkit to be rendered:
58
58
 
59
- ```js
60
- var UIToolkitConfig = JSON.stringify({
61
- videoSDKJWT: '',
62
- sessionName: '',
63
- userName: '',
64
- sessionPasscode: '',
65
- features: ['video', 'audio', 'settings', 'users', 'chat']
66
- })
59
+ ```html
60
+ <div id='UIToolkit'></div>
67
61
  ```
68
62
 
69
- Then, add the following HTML element to where you want the UI Toolkit to be rendered:
63
+ Then, create your UIToolkit instance and render it to your DOM:
70
64
 
71
- ```html
72
- <div id='UIToolkit'></div>
65
+ ```js
66
+ let UIKit = document.createElement('app-uitoolkit');
67
+
68
+ document.getElementById('UIToolkit')?.append(UIKit);
73
69
  ```
74
70
 
75
- Now, create your UIToolkit instance, pass in the UIToolkitConfig object, and render the UIToolkit:
71
+ Next, create your Video SDK config object, with your [Video SDK session info](https://developers.zoom.us/docs/video-sdk/web/sessions/#prerequisites), [Video SDK JWT](https://developers.zoom.us/docs/video-sdk/auth/), and features you want to render. Pass this object into the `window.initUIToolkit()` function and call the `window.joinSession()` function to start or join a Video SDK Session:
76
72
 
77
73
  ```js
78
- let UIToolkit = document.createElement('app-uitoolkit')
74
+ let UIToolkitConfig = {
75
+ videoSDKJWT: '',
76
+ sessionName: '',
77
+ userName: '',
78
+ sessionPasscode: '',
79
+ features: ['video', 'audio', 'settings', 'users', 'chat']
80
+ };
79
81
 
80
- UIToolkit.setAttribute("uitoolkitconfig", UIToolkitConfig)
82
+ window.initUIToolKit(obj);
81
83
 
82
- document.getElementById('UIToolkit')?.append(UIToolkit)
84
+ window.joinSession();
83
85
  ```
84
86
 
85
87
  ### Leave/End Session