bigbluebutton-html-plugin-sdk 0.1.2 → 0.1.5
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 +70 -35
- package/dist/cjs/core/api/BbbPluginSdk.d.ts +1 -1
- package/dist/cjs/core/api/BbbPluginSdk.js +10 -5
- package/dist/cjs/core/api/BbbPluginSdk.js.map +1 -1
- package/dist/cjs/core/api/types.d.ts +41 -10
- package/dist/cjs/core/auxiliary/join-url/getter.js +11 -7
- package/dist/cjs/core/auxiliary/join-url/getter.js.map +1 -1
- package/dist/cjs/core/auxiliary/plugin-information/locale-messages/types.d.ts +1 -4
- package/dist/cjs/core/auxiliary/plugin-information/locale-messages/useLocaleMessages.js +81 -39
- package/dist/cjs/core/auxiliary/plugin-information/locale-messages/useLocaleMessages.js.map +1 -1
- package/dist/cjs/core/auxiliary/plugin-information/locale-messages/utils.d.ts +3 -0
- package/dist/cjs/core/auxiliary/plugin-information/locale-messages/utils.js +72 -0
- package/dist/cjs/core/auxiliary/plugin-information/locale-messages/utils.js.map +1 -0
- package/dist/cjs/core/auxiliary/plugin-unmount/hook.d.ts +2 -0
- package/dist/cjs/core/auxiliary/plugin-unmount/hook.js +20 -0
- package/dist/cjs/core/auxiliary/plugin-unmount/hook.js.map +1 -0
- package/dist/cjs/core/auxiliary/plugin-unmount/types.d.ts +4 -0
- package/dist/cjs/core/auxiliary/plugin-unmount/types.js.map +1 -0
- package/dist/cjs/core/enum.d.ts +3 -1
- package/dist/cjs/core/enum.js +3 -1
- package/dist/cjs/core/enum.js.map +1 -1
- package/dist/cjs/core/index.d.ts +2 -0
- package/dist/cjs/core/index.js +3 -1
- package/dist/cjs/core/index.js.map +1 -1
- package/dist/cjs/core/utils/hooks.d.ts +1 -0
- package/dist/cjs/core/utils/hooks.js +13 -0
- package/dist/cjs/core/utils/hooks.js.map +1 -0
- package/dist/cjs/data-channel/enums.d.ts +1 -1
- package/dist/cjs/data-channel/enums.js +1 -1
- package/dist/cjs/data-consumption/domain/meeting/from-core/hooks.d.ts +1 -1
- package/dist/cjs/data-consumption/domain/meeting/from-core/types.d.ts +1 -1
- package/dist/cjs/data-consumption/domain/settings/plugin-settings/hooks.d.ts +2 -5
- package/dist/cjs/data-consumption/domain/settings/plugin-settings/hooks.js.map +1 -1
- package/dist/cjs/data-consumption/domain/settings/plugin-settings/types.d.ts +2 -0
- package/dist/cjs/data-consumption/domain/settings/plugin-settings/utils.d.ts +2 -7
- package/dist/cjs/data-consumption/domain/settings/plugin-settings/utils.js.map +1 -1
- package/dist/cjs/extensible-areas/actions-bar-item/component.d.ts +14 -8
- package/dist/cjs/extensible-areas/actions-bar-item/component.js +32 -10
- package/dist/cjs/extensible-areas/actions-bar-item/component.js.map +1 -1
- package/dist/cjs/extensible-areas/actions-bar-item/types.d.ts +18 -1
- package/dist/cjs/extensible-areas/audio-settings-dropdown-item/component.d.ts +4 -1
- package/dist/cjs/extensible-areas/audio-settings-dropdown-item/component.js +4 -1
- package/dist/cjs/extensible-areas/audio-settings-dropdown-item/component.js.map +1 -1
- package/dist/cjs/extensible-areas/audio-settings-dropdown-item/types.d.ts +1 -0
- package/dist/cjs/extensible-areas/base.d.ts +2 -2
- package/dist/cjs/extensible-areas/camera-settings-dropdown-item/component.d.ts +3 -1
- package/dist/cjs/extensible-areas/camera-settings-dropdown-item/component.js +4 -1
- package/dist/cjs/extensible-areas/camera-settings-dropdown-item/component.js.map +1 -1
- package/dist/cjs/extensible-areas/camera-settings-dropdown-item/types.d.ts +1 -0
- package/dist/cjs/extensible-areas/index.d.ts +1 -1
- package/dist/cjs/extensible-areas/index.js +1 -1
- package/dist/cjs/extensible-areas/index.js.map +1 -1
- package/dist/cjs/extensible-areas/media-area-item/component.d.ts +42 -0
- package/dist/cjs/extensible-areas/media-area-item/component.js +61 -0
- package/dist/cjs/extensible-areas/media-area-item/component.js.map +1 -0
- package/dist/cjs/extensible-areas/media-area-item/enums.d.ts +4 -0
- package/dist/cjs/extensible-areas/media-area-item/enums.js +10 -0
- package/dist/cjs/extensible-areas/media-area-item/enums.js.map +1 -0
- package/dist/cjs/extensible-areas/media-area-item/index.d.ts +2 -0
- package/dist/cjs/extensible-areas/media-area-item/index.js +7 -0
- package/dist/cjs/extensible-areas/media-area-item/index.js.map +1 -0
- package/dist/cjs/extensible-areas/media-area-item/types.d.ts +15 -0
- package/dist/cjs/extensible-areas/media-area-item/types.js.map +1 -0
- package/dist/cjs/extensible-areas/presentation-toolbar-item/component.d.ts +3 -1
- package/dist/cjs/extensible-areas/presentation-toolbar-item/component.js +3 -1
- package/dist/cjs/extensible-areas/presentation-toolbar-item/component.js.map +1 -1
- package/dist/cjs/extensible-areas/presentation-toolbar-item/types.d.ts +1 -0
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/ui-data/domain/chat/form/enums.js.map +1 -0
- package/dist/cjs/ui-data/domain/chat/form/types.js.map +1 -0
- package/dist/cjs/ui-data/domain/chat/index.js.map +1 -0
- package/dist/cjs/ui-data/domain/external-video/index.js.map +1 -0
- package/dist/cjs/ui-data/domain/external-video/volume/enums.js.map +1 -0
- package/dist/cjs/ui-data/domain/external-video/volume/types.js.map +1 -0
- package/dist/cjs/ui-data/domain/intl/index.js.map +1 -0
- package/dist/cjs/ui-data/domain/intl/locale/enums.js.map +1 -0
- package/dist/cjs/ui-data/domain/intl/locale/types.js.map +1 -0
- package/dist/cjs/ui-data/domain/layout/index.d.ts +1 -0
- package/dist/cjs/ui-data/domain/layout/index.js +7 -0
- package/dist/cjs/ui-data/domain/layout/index.js.map +1 -0
- package/dist/cjs/{ui-data-hooks → ui-data/domain}/layout/presentation-area/enums.d.ts +1 -1
- package/dist/cjs/{ui-data-hooks → ui-data/domain}/layout/presentation-area/enums.js +5 -5
- package/dist/cjs/ui-data/domain/layout/presentation-area/enums.js.map +1 -0
- package/dist/cjs/{ui-data-hooks → ui-data/domain}/layout/presentation-area/types.d.ts +2 -2
- package/dist/cjs/ui-data/domain/layout/presentation-area/types.js.map +1 -0
- package/dist/cjs/ui-data/domain/presentation/index.d.ts +1 -0
- package/dist/cjs/ui-data/domain/presentation/index.js +6 -0
- package/dist/cjs/ui-data/domain/presentation/index.js.map +1 -0
- package/dist/cjs/ui-data/domain/presentation/presentation-area/enums.d.ts +3 -0
- package/dist/cjs/ui-data/domain/presentation/presentation-area/enums.js +8 -0
- package/dist/cjs/ui-data/domain/presentation/presentation-area/enums.js.map +1 -0
- package/dist/cjs/ui-data/domain/presentation/presentation-area/types.d.ts +6 -0
- package/dist/cjs/ui-data/domain/presentation/presentation-area/types.js.map +1 -0
- package/dist/cjs/ui-data/domain/user-list/enums.js.map +1 -0
- package/dist/cjs/ui-data/domain/user-list/index.js.map +1 -0
- package/dist/cjs/ui-data/domain/user-list/types.js +4 -0
- package/dist/cjs/ui-data/domain/user-list/types.js.map +1 -0
- package/dist/cjs/ui-data/getters/consts.d.ts +1 -0
- package/dist/cjs/ui-data/getters/consts.js +5 -0
- package/dist/cjs/ui-data/getters/consts.js.map +1 -0
- package/dist/cjs/ui-data/getters/getters.d.ts +2 -0
- package/dist/cjs/ui-data/getters/getters.js +65 -0
- package/dist/cjs/ui-data/getters/getters.js.map +1 -0
- package/dist/cjs/ui-data/getters/types.d.ts +2 -0
- package/dist/cjs/ui-data/getters/types.js +3 -0
- package/dist/cjs/ui-data/getters/types.js.map +1 -0
- package/dist/cjs/ui-data/hooks/consts.js.map +1 -0
- package/dist/cjs/{ui-data-hooks → ui-data/hooks}/hooks.d.ts +1 -1
- package/dist/cjs/{ui-data-hooks → ui-data/hooks}/hooks.js +10 -1
- package/dist/cjs/ui-data/hooks/hooks.js.map +1 -0
- package/dist/cjs/ui-data/hooks/types.d.ts +2 -0
- package/dist/cjs/ui-data/hooks/types.js +3 -0
- package/dist/cjs/ui-data/hooks/types.js.map +1 -0
- package/dist/cjs/ui-data/index.d.ts +7 -0
- package/dist/cjs/{ui-data-hooks → ui-data}/index.js +6 -5
- package/dist/cjs/ui-data/index.js.map +1 -0
- package/dist/cjs/ui-data/types.d.ts +11 -0
- package/dist/cjs/ui-data/types.js +3 -0
- package/dist/cjs/{ui-data-hooks → ui-data}/types.js.map +1 -1
- package/package.json +12 -3
- package/dist/cjs/core/auxiliary/plugin-information/locale-messages/subscriptions.d.ts +0 -2
- package/dist/cjs/core/auxiliary/plugin-information/locale-messages/subscriptions.js +0 -6
- package/dist/cjs/core/auxiliary/plugin-information/locale-messages/subscriptions.js.map +0 -1
- package/dist/cjs/extensible-areas/action-button-dropdown-item/component.d.ts +0 -30
- package/dist/cjs/extensible-areas/action-button-dropdown-item/component.js +0 -50
- package/dist/cjs/extensible-areas/action-button-dropdown-item/component.js.map +0 -1
- package/dist/cjs/extensible-areas/action-button-dropdown-item/enums.d.ts +0 -4
- package/dist/cjs/extensible-areas/action-button-dropdown-item/enums.js +0 -10
- package/dist/cjs/extensible-areas/action-button-dropdown-item/enums.js.map +0 -1
- package/dist/cjs/extensible-areas/action-button-dropdown-item/index.d.ts +0 -2
- package/dist/cjs/extensible-areas/action-button-dropdown-item/index.js +0 -7
- package/dist/cjs/extensible-areas/action-button-dropdown-item/index.js.map +0 -1
- package/dist/cjs/extensible-areas/action-button-dropdown-item/types.d.ts +0 -14
- package/dist/cjs/extensible-areas/action-button-dropdown-item/types.js.map +0 -1
- package/dist/cjs/ui-data-hooks/chat/form/enums.js.map +0 -1
- package/dist/cjs/ui-data-hooks/chat/form/types.js.map +0 -1
- package/dist/cjs/ui-data-hooks/chat/index.js.map +0 -1
- package/dist/cjs/ui-data-hooks/consts.js.map +0 -1
- package/dist/cjs/ui-data-hooks/external-video/index.js.map +0 -1
- package/dist/cjs/ui-data-hooks/external-video/volume/enums.js.map +0 -1
- package/dist/cjs/ui-data-hooks/external-video/volume/types.js.map +0 -1
- package/dist/cjs/ui-data-hooks/hooks.js.map +0 -1
- package/dist/cjs/ui-data-hooks/index.d.ts +0 -6
- package/dist/cjs/ui-data-hooks/index.js.map +0 -1
- package/dist/cjs/ui-data-hooks/intl/index.js.map +0 -1
- package/dist/cjs/ui-data-hooks/intl/locale/enums.js.map +0 -1
- package/dist/cjs/ui-data-hooks/intl/locale/types.js.map +0 -1
- package/dist/cjs/ui-data-hooks/layout/index.d.ts +0 -1
- package/dist/cjs/ui-data-hooks/layout/index.js +0 -7
- package/dist/cjs/ui-data-hooks/layout/index.js.map +0 -1
- package/dist/cjs/ui-data-hooks/layout/presentation-area/enums.js.map +0 -1
- package/dist/cjs/ui-data-hooks/layout/presentation-area/types.js.map +0 -1
- package/dist/cjs/ui-data-hooks/types.d.ts +0 -11
- package/dist/cjs/ui-data-hooks/user-list/enums.js.map +0 -1
- package/dist/cjs/ui-data-hooks/user-list/index.js.map +0 -1
- package/dist/cjs/ui-data-hooks/user-list/types.js.map +0 -1
- /package/dist/cjs/{extensible-areas/action-button-dropdown-item → core/auxiliary/plugin-unmount}/types.js +0 -0
- /package/dist/cjs/{ui-data-hooks → extensible-areas/media-area-item}/types.js +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/domain}/chat/form/enums.d.ts +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/domain}/chat/form/enums.js +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/domain}/chat/form/types.d.ts +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/domain}/chat/form/types.js +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/domain}/chat/index.d.ts +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/domain}/chat/index.js +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/domain}/external-video/index.d.ts +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/domain}/external-video/index.js +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/domain}/external-video/volume/enums.d.ts +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/domain}/external-video/volume/enums.js +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/domain}/external-video/volume/types.d.ts +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/domain}/external-video/volume/types.js +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/domain}/intl/index.d.ts +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/domain}/intl/index.js +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/domain}/intl/locale/enums.d.ts +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/domain}/intl/locale/enums.js +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/domain}/intl/locale/types.d.ts +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/domain}/intl/locale/types.js +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/domain}/layout/presentation-area/types.js +0 -0
- /package/dist/cjs/{ui-data-hooks/user-list → ui-data/domain/presentation/presentation-area}/types.js +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/domain}/user-list/enums.d.ts +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/domain}/user-list/enums.js +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/domain}/user-list/index.d.ts +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/domain}/user-list/index.js +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/domain}/user-list/types.d.ts +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/hooks}/consts.d.ts +0 -0
- /package/dist/cjs/{ui-data-hooks → ui-data/hooks}/consts.js +0 -0
package/README.md
CHANGED
|
@@ -22,15 +22,15 @@ have a look at the READMEs in the respective [samples](samples)-folders.
|
|
|
22
22
|
|
|
23
23
|
For development purposes you can run a plugin locally from source.
|
|
24
24
|
|
|
25
|
-
For example if you take the [`sample-
|
|
25
|
+
For example if you take the [`sample-media-area-plugin`](samples/sample-media-area-plugin),
|
|
26
26
|
you do the following:
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
_Running from source code with local BBB-server_
|
|
29
29
|
|
|
30
30
|
1. Start the development server:
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
cd $HOME/src/bigbluebutton-html-plugin-sdk/samples/sample-
|
|
33
|
+
cd $HOME/src/bigbluebutton-html-plugin-sdk/samples/sample-media-area-plugin
|
|
34
34
|
npm install
|
|
35
35
|
npm start
|
|
36
36
|
```
|
|
@@ -41,7 +41,7 @@ you do the following:
|
|
|
41
41
|
pluginManifests=[{"url": "http://localhost:4701/manifest.json"}]
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
*Running from
|
|
44
|
+
*Running from source code with a remote BBB-server*
|
|
45
45
|
|
|
46
46
|
If you are running your BBB-server elsewhere, than you can't simply point the manifest URL to a local address, you'll need to either serve the built version into a CDN or serve the dev version using a service to make it public. And for the second option we'd recommend NGROK. Here are the instructions to do that:
|
|
47
47
|
|
|
@@ -89,16 +89,16 @@ And there you go, you can test it freely.
|
|
|
89
89
|
### Building the Plugin (Production)
|
|
90
90
|
|
|
91
91
|
To build a plugin for production use
|
|
92
|
-
(again, using the example of [`sample-
|
|
92
|
+
(again, using the example of [`sample-media-area-plugin`](samples/sample-media-area-plugin)),
|
|
93
93
|
follow these steps:
|
|
94
94
|
|
|
95
95
|
```bash
|
|
96
|
-
cd $HOME/src/bigbluebutton-html-plugin-sdk/samples/sample-
|
|
96
|
+
cd $HOME/src/bigbluebutton-html-plugin-sdk/samples/sample-media-area-plugin
|
|
97
97
|
npm ci
|
|
98
98
|
npm run build-bundle
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
-
The above command will generate the `dist` folder, containing the bundled JavaScript file named `
|
|
101
|
+
The above command will generate the `dist` folder, containing the bundled JavaScript file named `SampleMediaAreaPlugin.js` along with the `manifest.json`.
|
|
102
102
|
These files can be hosted on any HTTPS server.
|
|
103
103
|
|
|
104
104
|
To use the plugin with BigBlueButton, add the plugin's `manifest.json` URL to `bigbluebutton.properties` or you can simply send it via `/create` parameter:
|
|
@@ -110,12 +110,12 @@ pluginManifests=[{"url":"<your-domain>/path/to/manifest.json"}]
|
|
|
110
110
|
#### Hosting the Plugin on a BBB Server
|
|
111
111
|
|
|
112
112
|
While the plugin can be hosted on any Server, it is also possible to host the bundled file directly on
|
|
113
|
-
a BigBlueButton server. For that you copy `dist/
|
|
114
|
-
In this case, the your manifest URL will be `https://<your-host>/plugins/
|
|
113
|
+
a BigBlueButton server. For that you copy `dist/SampleMediaAreaPlugin.js` and `dist/manifest.json` to the folder `/var/www/bigbluebutton-default/assets/plugins/sampleMediaAreaPlugin`.
|
|
114
|
+
In this case, the your manifest URL will be `https://<your-host>/plugins/sampleMediaAreaPlugin/manifest.json`.
|
|
115
115
|
|
|
116
116
|
### Manifest Json
|
|
117
117
|
|
|
118
|
-
Here is as complete `
|
|
118
|
+
Here is as complete `manifest.json` example with all possible configurations:
|
|
119
119
|
|
|
120
120
|
```json
|
|
121
121
|
{
|
|
@@ -132,11 +132,6 @@ Here is as complete `manifet.json` example with all possible configurations:
|
|
|
132
132
|
], // One can enable more data-channels to better organize client communication
|
|
133
133
|
"eventPersistence": {
|
|
134
134
|
"isEnabled": true, // By default it is not enabled
|
|
135
|
-
"maximumPayloadSizeInBytes": 1024,
|
|
136
|
-
"rateLimiting": {
|
|
137
|
-
"messagesAllowedPerSecond": 10,
|
|
138
|
-
"messagesAllowedPerMinute": 20
|
|
139
|
-
}
|
|
140
135
|
},
|
|
141
136
|
"remoteDataSources": [
|
|
142
137
|
{
|
|
@@ -145,12 +140,56 @@ Here is as complete `manifet.json` example with all possible configurations:
|
|
|
145
140
|
"fetchMode": "onMeetingCreate", // Possible values: "onMeetingCreate", "onDemand"
|
|
146
141
|
"permissions": ["moderator", "viewer"]
|
|
147
142
|
}
|
|
143
|
+
],
|
|
144
|
+
"settingsSchema": [
|
|
145
|
+
{
|
|
146
|
+
"name": "myJson",
|
|
147
|
+
"label": "myJson",
|
|
148
|
+
"required": true,
|
|
149
|
+
"defaultValue": {
|
|
150
|
+
"abc": 123
|
|
151
|
+
},
|
|
152
|
+
"type": "json" // Possible values: "int", "float", "string", "boolean", "json"
|
|
153
|
+
}
|
|
148
154
|
]
|
|
149
155
|
}
|
|
150
156
|
```
|
|
151
157
|
|
|
152
158
|
To better understand remote-data-sources, please, refer to [this section](#external-data-resources)
|
|
153
159
|
|
|
160
|
+
**settingsSchema:**
|
|
161
|
+
|
|
162
|
+
The settingsSchema serves two main purposes:
|
|
163
|
+
|
|
164
|
+
1. **Validation:** Ensures that all required settings are provided for a plugin. If any required setting is missing, the plugin will not load.
|
|
165
|
+
2. **Configuration Exposure:** Lists all available settings for the plugin, enabling external systems—such as a Learning Management System (LMS)—to present these settings to a meeting organizer. This allows the organizer to configure the plugin manually before the meeting begins.
|
|
166
|
+
|
|
167
|
+
| **Name** | **Required** | **Description** |
|
|
168
|
+
| -------------- | ------------ | -------------------------------------------------------------------------------------------------------------- |
|
|
169
|
+
| `name` | Yes | The name of the setting as defined in the YAML file |
|
|
170
|
+
| `label` | No | A user-facing label that appears in the integration UI |
|
|
171
|
+
| `required` | Yes | Indicates whether this setting must be provided (`true` or `false`) |
|
|
172
|
+
| `defaultValue` | No | The default value to use if no setting is explicitly defined |
|
|
173
|
+
| `type` | Yes | The expected data type for the setting. Possible values: `"int"`, `"float"`, `"string"`, `"boolean"`, `"json"` |
|
|
174
|
+
|
|
175
|
+
**Example**
|
|
176
|
+
|
|
177
|
+
Given the `settingsSchema` defined in the `manifest.json` seen, the corresponding YAML configuration file (`/etc/bigbluebutton/bbb-html5.yml`) would look like:
|
|
178
|
+
|
|
179
|
+
```yml
|
|
180
|
+
public:
|
|
181
|
+
plugins:
|
|
182
|
+
- name: MyPlugin
|
|
183
|
+
settings:
|
|
184
|
+
myJson:
|
|
185
|
+
abc: my123
|
|
186
|
+
def: 3234
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## Testing SDK
|
|
190
|
+
|
|
191
|
+
To setup and run the automated tests for the plugin SDK samples, check the [testing doc](/tests/README.md)
|
|
192
|
+
|
|
154
193
|
## API
|
|
155
194
|
|
|
156
195
|
### Extensible UI areas
|
|
@@ -166,7 +205,7 @@ pluginApi.setterFunctionExample([{
|
|
|
166
205
|
}])
|
|
167
206
|
```
|
|
168
207
|
|
|
169
|
-
See, it is
|
|
208
|
+
See, it is basically a function that requires an array as an argument, with which the more items you push to that array, the more of that extensible area you will have.
|
|
170
209
|
|
|
171
210
|
That being said, here are the extensible areas we have so far:
|
|
172
211
|
|
|
@@ -176,6 +215,7 @@ That being said, here are the extensible areas we have so far:
|
|
|
176
215
|
- Audio settings dropdown items (option, separator)
|
|
177
216
|
- Camera settings dropdown items (option, separator)
|
|
178
217
|
- Options settings dropdown items (option, separator)
|
|
218
|
+
- Media Area Items (option, separator)
|
|
179
219
|
- Nav bar items (button, info)
|
|
180
220
|
- Presentation dropdown items (option, separator)
|
|
181
221
|
- Presentation toolbar items (button, separator, spinner)
|
|
@@ -189,7 +229,7 @@ That being said, here are the extensible areas we have so far:
|
|
|
189
229
|
|
|
190
230
|
Mind that no plugin will interfere into another's extensible area. So feel free to set whatever you need into a certain plugin with no worries.
|
|
191
231
|
|
|
192
|
-
###
|
|
232
|
+
### Auxiliary functions:
|
|
193
233
|
|
|
194
234
|
- `getSessionToken`: returns the user session token located on the user's URL.
|
|
195
235
|
- `getJoinUrl`: returns the join url associated with the parameters passed as an argument. Since it fetches the BigBlueButton API, this getter method is asynchronous.
|
|
@@ -204,7 +244,7 @@ Mind that no plugin will interfere into another's extensible area. So feel free
|
|
|
204
244
|
- `useLoadedChatMessages` hook: provides information regarding the loaded chat messages;
|
|
205
245
|
- `useCustomSubscription` hook: with this hook, the developer can query pretty much anything graphql can provide. Note: Make sure that, on BBB version change, the custom subscriptions you make will work as expected.
|
|
206
246
|
- `usePluginSettings` hook: it provides all the specific settings regarding the current plugin it's been loaded from.
|
|
207
|
-
- `useTalkingIndicator` hook: it gives you
|
|
247
|
+
- `useTalkingIndicator` hook: it gives you information on the user-voice data, that is, who is talking or muted.
|
|
208
248
|
- `useMeeting` hook: it gives you information on the current meeting that the user is on.
|
|
209
249
|
|
|
210
250
|
So for these types of hooks, the return will follow the same structure:
|
|
@@ -225,8 +265,8 @@ So we have the `data`, which is different for each hook, that's why it's a gener
|
|
|
225
265
|
|
|
226
266
|
So for this hook to read the data from the data channel, the developer will be able to choose the format in which they want it.The possible formats are described down below:
|
|
227
267
|
|
|
228
|
-
- ALL_ITEMS: Fetches all items from specific data-channel and specific subchannel-name since the
|
|
229
|
-
- LATEST_ITEM: Fetches only the latest item pushed to the data-channel within a specific subchannel-name since the
|
|
268
|
+
- ALL_ITEMS: Fetches all items from specific data-channel and specific subchannel-name since the beginning of the meeting from the newest to the latest (It can be used as a history);
|
|
269
|
+
- LATEST_ITEM: Fetches only the latest item pushed to the data-channel within a specific subchannel-name since the beginning of the meeting;
|
|
230
270
|
- NEW_ITEMS: Fetches the new items pushed to the data-channel within a specific subchannel-name since the moment that the `useDataChannel` hook has been called (It will not see entries sent previous to that moment);
|
|
231
271
|
|
|
232
272
|
An interesting thing about this hook is that it is generic, so, you can use a custom type, and this will be found not only in the consumer part of the data structure returned, but also in functions in which you need to specify an object to be persisted, meaning it will force the object to be of the type you mentioned previously (that is the case for `pushEntry` and `replaceEntry`). One can find examples of usage of this in the data-channel plugin sample or most of the official ones. The syntax is described below:
|
|
@@ -236,10 +276,10 @@ const {
|
|
|
236
276
|
data: response, // Data that will be returned
|
|
237
277
|
pushEntry: pushEntryFunction, // Function to push another item to the data-channel
|
|
238
278
|
deleteEntry: deleteEntryFunction, // Function to delete specific item or wipe all
|
|
239
|
-
replaceEntry: replaceEntryFunction, // Function replace a
|
|
279
|
+
replaceEntry: replaceEntryFunction, // Function replace a specific item
|
|
240
280
|
} = useDataChannel<CustomType>(
|
|
241
281
|
channelName, // Defined according to what is on manifest.json
|
|
242
|
-
DataChannelTypes.
|
|
282
|
+
DataChannelTypes.ALL_ITEMS, // | LATEST_ITEM | NEW_ITEMS -> ALL_ITEMS is default
|
|
243
283
|
subChannelName = 'default', // If no subchannelName is specified, it will be 'default'
|
|
244
284
|
);
|
|
245
285
|
```
|
|
@@ -285,14 +325,14 @@ export type ObjectTo = ToUserId | ToRole;
|
|
|
285
325
|
|
|
286
326
|
### Real time ui data consumption
|
|
287
327
|
|
|
288
|
-
- `useUiData` hook: This will return certain data from the UI depending on the parameter the developer uses. It works just like the useUiEvent hook, but instead of passing a callback as a parameter to be run
|
|
328
|
+
- `useUiData` hook: This will return certain data from the UI depending on the parameter the developer uses. It works just like the useUiEvent hook, but instead of passing a callback as a parameter to be run every time the event occurs, it will return the data directly, keep in mind that the second parameter is the default value that this function will assume. Possible choices:
|
|
289
329
|
- IntlLocaleUiDataNames.CURRENT_LOCALE;
|
|
290
330
|
- ChatFormUiDataNames.CURRENT_CHAT_INPUT_TEXT;
|
|
291
331
|
- ChatFormUiDataNames.CHAT_INPUT_IS_FOCUSED;
|
|
292
332
|
- ExternalVideoVolumeUiDataNames.CURRENT_VOLUME_VALUE;
|
|
293
333
|
- ExternalVideoVolumeUiDataNames.IS_VOLUME_MUTED;
|
|
294
334
|
- UserListUiDataNames.USER_LIST_IS_OPEN;
|
|
295
|
-
-
|
|
335
|
+
- LayoutPresentationAreaUiDataNames.CURRENT_ELEMENT;
|
|
296
336
|
|
|
297
337
|
Example of usage:
|
|
298
338
|
|
|
@@ -410,9 +450,9 @@ Going through each parameter to better understand it's structure:
|
|
|
410
450
|
|
|
411
451
|
- `name`: It is the name of the remote data source, that is the name you'll use later on in the plugin when developing it;
|
|
412
452
|
- `url`: The Url to which the data will be fetched (it can be hard-coded in the `manifest.json`, but we recommend passing it as a `meta_` parameter);
|
|
413
|
-
- `fetchMode`: It tells the plugin-server if it should fetch the data only when creating the meeting, or
|
|
414
|
-
- If one chooses `onMeetingCreate`, the data will be fetched when the create endpoint of the meeting is called, then it's cached in the plugin-server so that
|
|
415
|
-
- On the other hand, if `onDemand` is selected,
|
|
453
|
+
- `fetchMode`: It tells the plugin-server if it should fetch the data only when creating the meeting, or every time the function is called in the plugin portion;
|
|
454
|
+
- If one chooses `onMeetingCreate`, the data will be fetched when the create endpoint of the meeting is called, then it's cached in the plugin-server so that every time the plugin wants that data, the plugin-server will respond with the cached data;
|
|
455
|
+
- On the other hand, if `onDemand` is selected, every time the plugin calls this method, the plugin-server will fetch the data and then proxy it to the plugin;
|
|
416
456
|
- `permissions`: This tells the back-end which role of the meeting can access this remote data;
|
|
417
457
|
|
|
418
458
|
Here is the `/create` parameters you would have to pass to make this remote-data-source api work:
|
|
@@ -448,7 +488,7 @@ This feature is mainly used for security purposes, see [external data section](#
|
|
|
448
488
|
|
|
449
489
|
### Event persistence
|
|
450
490
|
|
|
451
|
-
This feature will allow the developer to save an information (
|
|
491
|
+
This feature will allow the developer to save an information (an event) in the `event.xml` file of the meeting, if it's being recorded.
|
|
452
492
|
|
|
453
493
|
To use it, one first need to add the following lines to their `manifest.json`:
|
|
454
494
|
|
|
@@ -457,11 +497,6 @@ To use it, one first need to add the following lines to their `manifest.json`:
|
|
|
457
497
|
// ...rest of manifest configuration
|
|
458
498
|
"eventPersistence": {
|
|
459
499
|
"isEnabled": true,
|
|
460
|
-
"maximumPayloadSizeInBytes": 1024,
|
|
461
|
-
"rateLimiting": {
|
|
462
|
-
"messagesAllowedPerSecond": 10,
|
|
463
|
-
"messagesAllowedPerMinute": 20
|
|
464
|
-
}
|
|
465
500
|
}
|
|
466
501
|
}
|
|
467
502
|
```
|
|
@@ -530,13 +565,13 @@ See example below:
|
|
|
530
565
|
// All set from this plugin will disappear from the UI;
|
|
531
566
|
```
|
|
532
567
|
|
|
533
|
-
**How to
|
|
568
|
+
**How to properly build a plugin?**
|
|
534
569
|
Just go to your plugin folder, install dependencies and run the build command as follows:
|
|
535
570
|
|
|
536
571
|
```bash
|
|
537
572
|
cd my-plugin-folder/
|
|
538
573
|
npm i
|
|
539
|
-
npm run build-
|
|
574
|
+
npm run build-bundle
|
|
540
575
|
```
|
|
541
576
|
|
|
542
577
|
At this point, another folder will be created into the plugin directory called "dist/" inside of that folder you will find the plugin itself `MyPlugin.js`. Remember that the name of this file will be the same as defined in the `webpack.config.js`, such as:
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.BbbPluginSdk = void 0;
|
|
7
7
|
/* eslint-disable no-console */
|
|
8
8
|
var react_1 = require("react");
|
|
9
|
+
var hook_1 = __importDefault(require("../auxiliary/plugin-unmount/hook"));
|
|
9
10
|
var enums_1 = require("../../data-channel/enums");
|
|
10
11
|
var commands_1 = require("../../ui-commands/commands");
|
|
11
12
|
var hooks_1 = require("../../data-channel/hooks");
|
|
@@ -21,13 +22,14 @@ var hooks_7 = require("../../data-consumption/domain/chat/loaded-chat-messages/h
|
|
|
21
22
|
var hooks_8 = require("../../dom-element-manipulation/chat/message/hooks");
|
|
22
23
|
var hooks_9 = require("../../dom-element-manipulation/user-camera/hooks");
|
|
23
24
|
var hooks_10 = require("../../data-consumption/domain/user-voice/talking-indicator/hooks");
|
|
24
|
-
var hooks_11 = require("../../ui-data
|
|
25
|
+
var hooks_11 = require("../../ui-data/hooks/hooks");
|
|
25
26
|
var hooks_12 = require("../../data-consumption/domain/meeting/from-core/hooks");
|
|
26
27
|
var commands_2 = require("../../server-commands/commands");
|
|
27
28
|
var hooks_13 = require("../../learning-analytics-dashboard/hooks");
|
|
28
29
|
var utils_1 = require("../../remote-data/utils");
|
|
29
30
|
var hooks_14 = require("../../event-persistence/hooks");
|
|
30
31
|
var useLocaleMessages_1 = __importDefault(require("../auxiliary/plugin-information/locale-messages/useLocaleMessages"));
|
|
32
|
+
var getters_1 = require("../../ui-data/getters/getters");
|
|
31
33
|
/**
|
|
32
34
|
* Class responsible for either initialize or get the PluginApi
|
|
33
35
|
*
|
|
@@ -60,15 +62,18 @@ var BbbPluginSdk = /** @class */ (function () {
|
|
|
60
62
|
pluginApi.useMeeting = (function () { return (0, hooks_12.useMeeting)(); });
|
|
61
63
|
pluginApi.useUsersBasicInfo = (function () { return (0, hooks_6.useUsersBasicInfo)(); });
|
|
62
64
|
pluginApi.useTalkingIndicator = (function () { return (0, hooks_10.useTalkingIndicator)(); });
|
|
65
|
+
pluginApi.getJoinUrl = function (params) { return (0, getter_2.getJoinUrl)(params); };
|
|
63
66
|
pluginApi.useLoadedChatMessages = (function () { return (0, hooks_7.useLoadedChatMessages)(); });
|
|
64
67
|
pluginApi.useChatMessageDomElements = function (messageIds) { return (0, hooks_8.useChatMessageDomElements)(messageIds, uuid); };
|
|
65
68
|
pluginApi.useUserCameraDomElements = function (streamIds) { return (0, hooks_9.useUserCameraDomElements)(streamIds, uuid); };
|
|
66
69
|
pluginApi.uiCommands = commands_1.uiCommands;
|
|
67
70
|
pluginApi.useUiData = hooks_11.useUiData;
|
|
71
|
+
pluginApi.getUiData = getters_1.getUiData;
|
|
68
72
|
var pluginName = pluginApi === null || pluginApi === void 0 ? void 0 : pluginApi.pluginName;
|
|
73
|
+
pluginApi.useShouldUnmountPlugin = hook_1.default;
|
|
69
74
|
if (pluginName) {
|
|
70
75
|
pluginApi.useDataChannel = (function (channelName, dataChannelType, subChannelName) {
|
|
71
|
-
if (dataChannelType === void 0) { dataChannelType = enums_1.DataChannelTypes.
|
|
76
|
+
if (dataChannelType === void 0) { dataChannelType = enums_1.DataChannelTypes.ALL_ITEMS; }
|
|
72
77
|
if (subChannelName === void 0) { subChannelName = 'default'; }
|
|
73
78
|
return (0, hooks_1.useDataChannelGeneral)(channelName, subChannelName, pluginName, window.bbb_plugins[uuid], dataChannelType);
|
|
74
79
|
});
|
|
@@ -110,14 +115,14 @@ var BbbPluginSdk = /** @class */ (function () {
|
|
|
110
115
|
* @returns The PluginApi object
|
|
111
116
|
*
|
|
112
117
|
*/
|
|
113
|
-
BbbPluginSdk.getPluginApi = function (uuid, pluginName) {
|
|
118
|
+
BbbPluginSdk.getPluginApi = function (uuid, pluginName, localesBaseUrl) {
|
|
114
119
|
if (!window.bbb_plugins)
|
|
115
120
|
window.bbb_plugins = {};
|
|
116
121
|
if (Object.keys(window.bbb_plugins).indexOf(uuid) === -1) {
|
|
117
122
|
window.bbb_plugins[uuid] = {
|
|
118
123
|
setUserListDropdownItems: function () { return []; },
|
|
119
124
|
setPresentationToolbarItems: function () { return []; },
|
|
120
|
-
|
|
125
|
+
setMediaAreaItems: function () { return []; },
|
|
121
126
|
setActionsBarItems: function () { return []; },
|
|
122
127
|
setAudioSettingsDropdownItems: function () { return []; },
|
|
123
128
|
setAppsGalleryItems: function () { return []; },
|
|
@@ -135,8 +140,8 @@ var BbbPluginSdk = /** @class */ (function () {
|
|
|
135
140
|
'': function () { },
|
|
136
141
|
},
|
|
137
142
|
getSessionToken: function () { return (0, getter_1.getSessionToken)(); },
|
|
138
|
-
getJoinUrl: function (params) { return (0, getter_2.getJoinUrl)(params); },
|
|
139
143
|
pluginName: pluginName,
|
|
144
|
+
localesBaseUrl: localesBaseUrl,
|
|
140
145
|
};
|
|
141
146
|
}
|
|
142
147
|
return window.bbb_plugins[uuid];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BbbPluginSdk.js","sourceRoot":"","sources":["../../../../src/core/api/BbbPluginSdk.ts"],"names":[],"mappings":";;;;;;AAAA,+BAA+B;AAC/B,+BAAkC;
|
|
1
|
+
{"version":3,"file":"BbbPluginSdk.js","sourceRoot":"","sources":["../../../../src/core/api/BbbPluginSdk.ts"],"names":[],"mappings":";;;;;;AAAA,+BAA+B;AAC/B,+BAAkC;AAClC,0EAAsE;AAOtE,kDAA4D;AAO5D,uDAAwD;AAQxD,kDAAiE;AACjE,gGAEgF;AAChF,wFAEwE;AACxE,oFAA+F;AAC/F,gFAAwF;AACxF,oFAA+F;AAC/F,4DAAoE;AACpE,uDAA0D;AAC1D,mEAA2E;AAE3E,uFAAsG;AACtG,2EAA8F;AAC9F,0EAA4F;AAE5F,2FAAuG;AACvG,oDAAsD;AAEtD,gFAAmF;AACnF,2DAAgE;AAChE,mEAAwG;AAExG,iDAAwD;AACxD,wDAA4E;AAC5E,wHAA2G;AAC3G,yDAA0D;AAI1D;;;;;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AAM,OAAA,EAAE,EAAF,CAAE;gBAC5B,6BAA6B,EAAE,cAAM,OAAA,EAAE,EAAF,CAAE;gBACvC,mBAAmB,EAAE,cAAM,OAAA,EAAE,EAAF,CAAE;gBAC7B,4BAA4B,EAAE,cAAM,OAAA,EAAE,EAAF,CAAE;gBACtC,cAAc,EAAE,cAAM,OAAA,EAAE,EAAF,CAAE;gBACxB,yBAAyB,EAAE,cAAM,OAAA,EAAE,EAAF,CAAE;gBACnC,wBAAwB,EAAE,cAAM,OAAA,EAAE,EAAF,CAAE;gBAClC,uBAAuB,EAAE,cAAM,OAAA,EAAE,EAAF,CAAE;gBACjC,8BAA8B,EAAE,cAAM,OAAA,EAAE,EAAF,CAAE;gBACxC,0BAA0B,EAAE,cAAM,OAAA,EAAE,EAAF,CAAE;gBACpC,oCAAoC,EAAE,cAAM,OAAA,EAAE,EAAF,CAAE;gBAC9C,kBAAkB,EAAE,cAAM,OAAA,EAAE,EAAF,CAAE;gBAC5B,sBAAsB,EAAE,cAAM,OAAA,EAAE,EAAF,CAAE;gBAChC,uBAAuB,EAAE;oBACvB,EAAE,EAAE,cAAO,CAAC;iBACb;gBACD,eAAe,EAAE,cAAM,OAAA,IAAA,wBAAe,GAAE,EAAjB,CAAiB;gBACxC,UAAU,YAAA;gBACV,cAAc,gBAAA;aACf,CAAC;SACH;QAED,OAAO,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;IACH,mBAAC;AAAD,CAAC,AA1ID,IA0IC;AA1IqB,oCAAY"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UiCommands } from '../../ui-commands/types';
|
|
2
2
|
import { UseChatMessageDomElementsFunction } from '../../dom-element-manipulation/chat/message/types';
|
|
3
|
-
import {
|
|
3
|
+
import { MediaAreaInterface } from '../../extensible-areas/media-area-item/types';
|
|
4
4
|
import { ActionsBarInterface } from '../../extensible-areas/actions-bar-item/types';
|
|
5
5
|
import { AudioSettingsDropdownInterface } from '../../extensible-areas/audio-settings-dropdown-item/types';
|
|
6
6
|
import { CameraSettingsDropdownInterface } from '../../extensible-areas/camera-settings-dropdown-item/types';
|
|
@@ -24,7 +24,7 @@ import { UsePluginSettingsFunction } from '../../data-consumption/domain/setting
|
|
|
24
24
|
import { UseLoadedChatMessagesFunction } from '../../data-consumption/domain/chat/loaded-chat-messages/types';
|
|
25
25
|
import { UseTalkingIndicatorFunction } from '../../data-consumption/domain/user-voice/talking-indicator/types';
|
|
26
26
|
import { GenericContentInterface } from '../../extensible-areas/generic-content-item/types';
|
|
27
|
-
import { UseUiDataFunction } from '../../ui-data
|
|
27
|
+
import { UseUiDataFunction } from '../../ui-data/hooks/types';
|
|
28
28
|
import { UseMeetingFunction } from '../../data-consumption/domain/meeting/from-core/types';
|
|
29
29
|
import { ServerCommands } from '../../server-commands/types';
|
|
30
30
|
import { SendGenericDataForLearningAnalyticsDashboard } from '../../learning-analytics-dashboard/types';
|
|
@@ -33,9 +33,11 @@ import { AppsGalleryInterface, ScreenshareHelperInterface, UserCameraHelperInter
|
|
|
33
33
|
import { GetDataSource } from '../../remote-data/types';
|
|
34
34
|
import { PersistEventFunction } from '../../event-persistence/types';
|
|
35
35
|
import { UseLocaleMessagesFunction } from '../auxiliary/plugin-information/locale-messages/types';
|
|
36
|
+
import { UseShouldUnmountPluginFunction } from '../auxiliary/plugin-unmount/types';
|
|
37
|
+
import { GetUiDataFunction } from '../../ui-data/getters/types';
|
|
36
38
|
export type SetPresentationToolbarItems = (presentationToolbarItem: PresentationToolbarInterface[]) => string[];
|
|
37
39
|
export type SetUserListDropdownItems = (userListDropdownItem: UserListDropdownInterface[]) => string[];
|
|
38
|
-
export type
|
|
40
|
+
export type SetMediaAreaItems = (mediaAreaDropdownInterface: MediaAreaInterface[]) => string[];
|
|
39
41
|
export type SetActionsBarItems = (actionsBarItems: ActionsBarInterface[]) => string[];
|
|
40
42
|
export type SetAudioSettingsDropdownItems = (audioSettingsDropdownItem: AudioSettingsDropdownInterface[]) => string[];
|
|
41
43
|
export type SetAppsGalleryItems = (appsGalleryItems: AppsGalleryInterface[]) => string[];
|
|
@@ -53,9 +55,10 @@ export type SetGenericContentItems = (genericContents: GenericContentInterface[]
|
|
|
53
55
|
*/
|
|
54
56
|
export interface PluginApi {
|
|
55
57
|
pluginName?: string;
|
|
58
|
+
localesBaseUrl?: string;
|
|
56
59
|
setPresentationToolbarItems: SetPresentationToolbarItems;
|
|
57
60
|
setUserListDropdownItems: SetUserListDropdownItems;
|
|
58
|
-
|
|
61
|
+
setMediaAreaItems: SetMediaAreaItems;
|
|
59
62
|
setActionsBarItems: SetActionsBarItems;
|
|
60
63
|
setAudioSettingsDropdownItems: SetAudioSettingsDropdownItems;
|
|
61
64
|
setAppsGalleryItems: SetAppsGalleryItems;
|
|
@@ -125,13 +128,23 @@ export interface PluginApi {
|
|
|
125
128
|
*/
|
|
126
129
|
usePluginSettings?: UsePluginSettingsFunction;
|
|
127
130
|
/**
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
131
|
+
* Returns an object containing a list user-voice with the main properties of that object,
|
|
132
|
+
* that being talking (boolean), startTime (number), muted (boolean) and userId (string).
|
|
133
|
+
*
|
|
134
|
+
* @returns `GraphqlResponseWrapper` with the list of user-voice.
|
|
135
|
+
*
|
|
136
|
+
*/
|
|
134
137
|
useTalkingIndicator?: UseTalkingIndicatorFunction;
|
|
138
|
+
/**
|
|
139
|
+
* Returns a boolean telling if the plugin should be unmounted or not based on the mounting
|
|
140
|
+
* of the meeting. This means that if the meeting end or the user is ejected, this will
|
|
141
|
+
* tell that the plugin should not be mounted and it's reversable: if the meeting is
|
|
142
|
+
* mounted again, it will update.
|
|
143
|
+
*
|
|
144
|
+
* @returns boolean
|
|
145
|
+
*
|
|
146
|
+
*/
|
|
147
|
+
useShouldUnmountPlugin?: UseShouldUnmountPluginFunction;
|
|
135
148
|
/**
|
|
136
149
|
* Returns an object containing the data on the current presentation being displayed
|
|
137
150
|
* in the presentation area, and its current page.
|
|
@@ -169,6 +182,16 @@ export interface PluginApi {
|
|
|
169
182
|
*
|
|
170
183
|
*/
|
|
171
184
|
useUiData?: UseUiDataFunction;
|
|
185
|
+
/**
|
|
186
|
+
* Function that returns the ui data the developer wants.
|
|
187
|
+
*
|
|
188
|
+
* @param dataName The name of ui data chosen to be returned.
|
|
189
|
+
*
|
|
190
|
+
* @returns The Promise with the UI data object according to the
|
|
191
|
+
* UiDataName chosen as the parameter
|
|
192
|
+
*
|
|
193
|
+
*/
|
|
194
|
+
getUiData?: GetUiDataFunction;
|
|
172
195
|
/**
|
|
173
196
|
* Returns an array with the DOM elements for the chat messages.
|
|
174
197
|
*
|
|
@@ -219,8 +242,16 @@ export interface PluginApi {
|
|
|
219
242
|
*/
|
|
220
243
|
persistEvent?: PersistEventFunction;
|
|
221
244
|
}
|
|
245
|
+
export interface MeetingClientSettings {
|
|
246
|
+
public: {
|
|
247
|
+
app: {
|
|
248
|
+
bbbWebBase: string;
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
}
|
|
222
252
|
export interface PluginBrowserWindow extends Window {
|
|
223
253
|
bbb_plugins: {
|
|
224
254
|
[key: string]: PluginApi;
|
|
225
255
|
};
|
|
256
|
+
meetingClientSettings?: MeetingClientSettings;
|
|
226
257
|
}
|
|
@@ -48,19 +48,23 @@ function objectToUrlParameters(parameters) {
|
|
|
48
48
|
return queryString;
|
|
49
49
|
}
|
|
50
50
|
function getJoinUrl(parameters) {
|
|
51
|
+
var _a;
|
|
51
52
|
return __awaiter(this, void 0, void 0, function () {
|
|
52
|
-
var urlParameters, url, response, responseUrl;
|
|
53
|
-
return __generator(this, function (
|
|
54
|
-
switch (
|
|
53
|
+
var urlParameters, baseUrl, url, response, responseUrl;
|
|
54
|
+
return __generator(this, function (_b) {
|
|
55
|
+
switch (_b.label) {
|
|
55
56
|
case 0:
|
|
56
57
|
urlParameters = objectToUrlParameters(parameters);
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
baseUrl = ((_a = window.meetingClientSettings) === null || _a === void 0 ? void 0 : _a.public.app.bbbWebBase) || '/bigbluebutton';
|
|
59
|
+
url = "".concat(baseUrl, "/api/getJoinUrl?sessionToken=").concat((0, getter_1.getSessionToken)(), "&").concat(urlParameters);
|
|
60
|
+
return [4 /*yield*/, fetch(url, {
|
|
61
|
+
credentials: 'include',
|
|
62
|
+
})];
|
|
59
63
|
case 1:
|
|
60
|
-
response =
|
|
64
|
+
response = _b.sent();
|
|
61
65
|
return [4 /*yield*/, response.json()];
|
|
62
66
|
case 2:
|
|
63
|
-
responseUrl =
|
|
67
|
+
responseUrl = _b.sent();
|
|
64
68
|
return [2 /*return*/, responseUrl.response.url];
|
|
65
69
|
}
|
|
66
70
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getter.js","sourceRoot":"","sources":["../../../../../src/core/auxiliary/join-url/getter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"getter.js","sourceRoot":"","sources":["../../../../../src/core/auxiliary/join-url/getter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAA0D;AAI1D,SAAS,qBAAqB,CAAC,UAAmC;IAChE,IAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC;SAC3C,GAAG,CAAC,UAAC,EAAY;YAAX,GAAG,QAAA,EAAE,KAAK,QAAA;QAAM,OAAA,UAAG,kBAAkB,CAAC,GAAG,CAAC,cAAI,kBAAkB,CAAC,KAAK,CAAC,CAAE;IAAzD,CAAyD,CAAC;SAChF,IAAI,CAAC,GAAG,CAAC,CAAC;IACb,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,SAAsB,UAAU,CAAC,UAAmC;;;;;;;oBAC5D,aAAa,GAAG,qBAAqB,CAAC,UAAU,CAAC,CAAC;oBAClD,OAAO,GAAG,CAAA,MAAA,MAAM,CAAC,qBAAqB,0CAAE,MAAM,CAAC,GAAG,CAAC,UAAU,KAAI,gBAAgB,CAAC;oBAClF,GAAG,GAAG,UAAG,OAAO,0CAAgC,IAAA,wBAAe,GAAE,cAAI,aAAa,CAAE,CAAC;oBAC1E,qBAAM,KAAK,CAAC,GAAG,EAAE;4BAChC,WAAW,EAAE,SAAS;yBACvB,CAAC,EAAA;;oBAFI,QAAQ,GAAG,SAEf;oBACkB,qBAAM,QAAQ,CAAC,IAAI,EAAE,EAAA;;oBAAnC,WAAW,GAAG,SAAqB;oBACzC,sBAAO,WAAW,CAAC,QAAQ,CAAC,GAAa,EAAC;;;;CAC3C;AATD,gCASC"}
|
|
@@ -8,13 +8,10 @@ interface PluginInformationResult {
|
|
|
8
8
|
javascriptEntrypointUrl: string;
|
|
9
9
|
localesBaseUrl: string;
|
|
10
10
|
}
|
|
11
|
-
interface GraphqlResponseWrapper {
|
|
12
|
-
plugin: PluginInformationResult[];
|
|
13
|
-
}
|
|
14
11
|
interface IntlMessages {
|
|
15
12
|
loading: boolean;
|
|
16
13
|
messages: Record<string, string>;
|
|
17
14
|
currentLocale: string;
|
|
18
15
|
}
|
|
19
16
|
type UseLocaleMessagesFunction = (fetchConfigs?: RequestInit) => IntlMessages;
|
|
20
|
-
export { UseLocaleMessagesProps, PluginInformationResult,
|
|
17
|
+
export { UseLocaleMessagesProps, PluginInformationResult, IntlMessages, UseLocaleMessagesFunction, };
|