bigbluebutton-html-plugin-sdk 0.0.46 → 0.0.48
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 +156 -42
- package/dist/cjs/core/api/BbbPluginSdk.d.ts +1 -0
- package/dist/cjs/core/api/BbbPluginSdk.js +20 -0
- package/dist/cjs/core/api/BbbPluginSdk.js.map +1 -1
- package/dist/cjs/core/api/types.d.ts +9 -0
- package/dist/cjs/data-consumption/domain/meeting/from-core/hooks.d.ts +2 -0
- package/dist/cjs/data-consumption/domain/meeting/from-core/hooks.js +8 -0
- package/dist/cjs/data-consumption/domain/meeting/from-core/hooks.js.map +1 -0
- package/dist/cjs/data-consumption/domain/meeting/from-core/types.d.ts +7 -0
- package/dist/cjs/data-consumption/domain/meeting/from-core/types.js +3 -0
- package/dist/cjs/data-consumption/domain/meeting/from-core/types.js.map +1 -0
- package/dist/cjs/data-consumption/domain/meeting/index.d.ts +1 -0
- package/dist/cjs/data-consumption/domain/meeting/index.js +3 -0
- package/dist/cjs/data-consumption/domain/meeting/index.js.map +1 -0
- package/dist/cjs/data-consumption/enums.d.ts +1 -0
- package/dist/cjs/data-consumption/enums.js +1 -0
- package/dist/cjs/data-consumption/enums.js.map +1 -1
- package/dist/cjs/data-consumption/index.d.ts +1 -0
- package/dist/cjs/data-consumption/index.js +1 -0
- package/dist/cjs/data-consumption/index.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/utils/index.d.ts +2 -0
- package/dist/cjs/utils/index.js +9 -0
- package/dist/cjs/utils/index.js.map +1 -0
- package/dist/cjs/utils/logger/logger.d.ts +2 -0
- package/dist/cjs/utils/logger/logger.js +17 -0
- package/dist/cjs/utils/logger/logger.js.map +1 -0
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -23,19 +23,20 @@ For example if you take the [`sample-action-button-dropdown-plugin`](samples/sam
|
|
|
23
23
|
you do the following:
|
|
24
24
|
|
|
25
25
|
1. Start the development server:
|
|
26
|
-
```bash
|
|
27
|
-
cd $HOME/src/bigbluebutton-html-plugin-sdk/samples/sample-action-button-dropdown-plugin
|
|
28
|
-
npm install
|
|
29
|
-
npm start
|
|
30
|
-
```
|
|
31
26
|
|
|
27
|
+
```bash
|
|
28
|
+
cd $HOME/src/bigbluebutton-html-plugin-sdk/samples/sample-action-button-dropdown-plugin
|
|
29
|
+
npm install
|
|
30
|
+
npm start
|
|
31
|
+
```
|
|
32
32
|
2. Add reference to it on BigBlueButton's `settings.yml`:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
|
|
34
|
+
```yaml
|
|
35
|
+
public:
|
|
36
|
+
plugins:
|
|
37
|
+
- name: SampleActionButtonDropdownPlugin
|
|
38
|
+
url: http://127.0.0.1:4701/static/SampleActionButtonDropdownPlugin.js
|
|
39
|
+
```
|
|
39
40
|
|
|
40
41
|
_N.B.:_ Be aware that in this case the url is interpreted from the plugin in the browser,
|
|
41
42
|
so the localhost is actually your local development machine.
|
|
@@ -77,53 +78,65 @@ In this case, the `<<PLUGIN_URL>>` will be `https://<your-host>/plugins/SampleAc
|
|
|
77
78
|
|
|
78
79
|
### Extensible UI areas
|
|
79
80
|
|
|
80
|
-
|
|
81
|
+
Foreach of the following ui-extensible-area, we have a different setter function accessible via `pluginApi`.
|
|
81
82
|
|
|
82
|
-
|
|
83
|
+
Mind that, although each area has its own structure, all the functions follows a certain argument structure, and returns nothing, that would be:
|
|
83
84
|
|
|
84
|
-
|
|
85
|
+
```ts
|
|
86
|
+
pluginApi.setterFunctionExample([{
|
|
87
|
+
objectProperty1: 'string',
|
|
88
|
+
objectProperty2: 123,
|
|
89
|
+
}])
|
|
90
|
+
```
|
|
85
91
|
|
|
86
|
-
|
|
92
|
+
See, it is basicaly 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.
|
|
87
93
|
|
|
88
|
-
|
|
94
|
+
That being said, here are the extensible areas we have so far:
|
|
89
95
|
|
|
96
|
+
- Action bar items (button, separator)
|
|
97
|
+
- Action Button Dropdown Items (option, separator)
|
|
98
|
+
- Audio settings dropdown items (option, separator)
|
|
99
|
+
- Camera settings dropdown items (option, separator)
|
|
100
|
+
- Nav bar items (button, info)
|
|
90
101
|
- Presentation dropdown items (option, separator)
|
|
91
|
-
|
|
92
102
|
- Presentation toolbar items (button, separator, spinner)
|
|
93
|
-
|
|
94
103
|
- User camera settings dropdown items (option, separator)
|
|
95
|
-
|
|
96
104
|
- User list dropdown items (option, separator)
|
|
97
|
-
|
|
98
105
|
- User list item additional information (item, label)
|
|
99
|
-
|
|
100
106
|
- Floating window item (floatingWindow)
|
|
101
|
-
|
|
102
107
|
- Generic component (genericComponent)
|
|
103
108
|
|
|
109
|
+
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.
|
|
110
|
+
|
|
104
111
|
### Getters available through the API:
|
|
105
112
|
|
|
106
113
|
- `getSessionToken`: returns the user session token located on the user's URL.
|
|
107
|
-
|
|
108
114
|
- `getJoinUrl`: returns the join url associated with the parameters passed as an argument. Since it fetches the BigBlueButton API, this getter method is asynchronous.
|
|
109
115
|
|
|
110
116
|
### Realtime data consumption
|
|
111
117
|
|
|
112
118
|
- `useCurrentPresentation` hook: provides information regarding the current presentation;
|
|
113
|
-
|
|
114
119
|
- `useLoadedUserList` hook: provides information regarding the loaded user list (displayed in the screen);
|
|
115
|
-
|
|
116
120
|
- `useCurrentUser` hook: provides information regarding the current user;
|
|
117
|
-
|
|
118
121
|
- `useUsersBasicInfo` hook: provides information regarding all users (only crucial information: userId, name and role);
|
|
119
|
-
|
|
120
122
|
- `useLoadedChatMessages` hook: provides information regarding the loaded chat messages;
|
|
121
|
-
|
|
122
123
|
- `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.
|
|
123
|
-
|
|
124
124
|
- `usePluginSettings` hook: it provides all the specific settings regarding the current plugin it's been loaded from.
|
|
125
|
-
|
|
126
125
|
- `useTalkingIndicator` hook: it gives you invormation on the user-voice data, that is, who is talking or muted.
|
|
126
|
+
- `useMeeting` hook: it gives you information on the current meeting that the user is on.
|
|
127
|
+
|
|
128
|
+
So for these types of hooks, the return will follow the same structure:
|
|
129
|
+
|
|
130
|
+
```ts
|
|
131
|
+
export interface GraphqlResponseWrapper<TData> {
|
|
132
|
+
loading: boolean;
|
|
133
|
+
data?: TData;
|
|
134
|
+
error?: ApolloError;
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
So we have the `data`, which is different for each hook, that's why it's a generic, the error, that will be set if, and only if, there is an error, otherwise it is undefined, and loading, which tells the developer if the query is still loading (being fetched) or not.
|
|
139
|
+
|
|
127
140
|
|
|
128
141
|
### Real time data exchange
|
|
129
142
|
|
|
@@ -197,27 +210,128 @@ export type ObjectTo = ToUserId | ToRole;
|
|
|
197
210
|
- UserListUiDataNames.USER_LIST_IS_OPEN;
|
|
198
211
|
|
|
199
212
|
Example of usage:
|
|
200
|
-
|
|
201
|
-
|
|
213
|
+
|
|
214
|
+
```ts
|
|
215
|
+
const currentLocale = pluginApi.useUiData(IntlLocaleUiDataNames.CURRENT_LOCALE, {
|
|
202
216
|
locale: 'en',
|
|
203
217
|
fallbackLocale: 'en',
|
|
204
218
|
});
|
|
219
|
+
// Do something with the currentLocale:
|
|
220
|
+
currentLocale.locale;
|
|
221
|
+
currentLocale.fallbackLocale;
|
|
222
|
+
|
|
205
223
|
```
|
|
206
224
|
|
|
225
|
+
Mind that foreach enum we have, a different type of fallback is needed as the second argument. In the example above, we want the `intl`, so the second argument, will follow the structure depicted.
|
|
226
|
+
|
|
227
|
+
One other thing is that the type of the return is precisely the same type required as the second argument.
|
|
228
|
+
|
|
207
229
|
### Ui Commands to automatize tasks in BBB
|
|
208
230
|
|
|
209
231
|
`uiCommands` object: It basically contains all the possible commands available to the developer to interact with the core BBB UI, see the ones implemented down below:
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
232
|
+
|
|
233
|
+
- chat:
|
|
234
|
+
- form:
|
|
235
|
+
- open: this function will open the sidebar chat panel automatically;
|
|
236
|
+
- fill: this function will fill the form input field of the chat passed in the argument as {text: string}
|
|
237
|
+
- external-video:
|
|
238
|
+
- volume:
|
|
239
|
+
- set: this function will set the external video volume to a certain number between 0 and 1 (that is 0% and);
|
|
240
|
+
|
|
241
|
+
See usage ahead:
|
|
242
|
+
|
|
243
|
+
```ts
|
|
244
|
+
pluginApi.uiCommands.chat.form.open();
|
|
245
|
+
pluginApi.uiCommands.chat.form.fill({
|
|
246
|
+
text: 'Just an example message filled by the plugin',
|
|
247
|
+
});
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
So the idea is that we have a `uiCommands` object and at a point, there will be the command to do the intended action, such as open the chat form and/or fill it, as demonstrated above
|
|
220
251
|
|
|
221
252
|
### Dom Element Manipulation
|
|
222
253
|
|
|
223
254
|
- `useChatMessageDomElements` hook: This hook will return the dom element of a chat message reactively, so one can modify whatever is inside, such as text, css, js, etc.;
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
### Frequently Asked Questions (FAQ)
|
|
258
|
+
|
|
259
|
+
**How do I remove a certain extensible area that I don't want anymore?**
|
|
260
|
+
It is pretty simple: just set an empty array of elements of that specific extensible area.
|
|
261
|
+
Or simply remove the specific item of the array and set the new array to that extensible area in the next iteration.
|
|
262
|
+
|
|
263
|
+
See example below:
|
|
264
|
+
|
|
265
|
+
```ts
|
|
266
|
+
// First iteration:
|
|
267
|
+
// Define both variables:
|
|
268
|
+
const dropdownToUserListItem = { ... };
|
|
269
|
+
const buttonToUserListItem = { ... };
|
|
270
|
+
pluginApi.setActionsBarItems([dropdownToUserListItem, buttonToUserListItem]);
|
|
271
|
+
|
|
272
|
+
// Second iteration:
|
|
273
|
+
// Redefine variable(s):
|
|
274
|
+
const newButtonToUserListItem = { ... };
|
|
275
|
+
pluginApi.setActionsBarItems([newButtonToUserListItem]);
|
|
276
|
+
|
|
277
|
+
// Third iteration:
|
|
278
|
+
// I don't want any of this extensible-area:
|
|
279
|
+
pluginApi.setActionsBarItems([]);
|
|
280
|
+
// All set from this plugin will disappear from the UI;
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
**How to propperly build a plugin?**
|
|
284
|
+
Just go to your plugin folder, install dependencies and run the build command as follows:
|
|
285
|
+
|
|
286
|
+
```bash
|
|
287
|
+
cd my-plugin-folder/
|
|
288
|
+
npm i
|
|
289
|
+
npm run build-bundl
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
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:
|
|
293
|
+
|
|
294
|
+
```js
|
|
295
|
+
module.exports = {
|
|
296
|
+
// ... Other configurations
|
|
297
|
+
output: {
|
|
298
|
+
filename: 'MyPlugin.js'
|
|
299
|
+
}
|
|
300
|
+
// ... Other configurations
|
|
301
|
+
}
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
**Does the builded plugin need to be in the same BBB server?**
|
|
305
|
+
No, feel free to host it anywhere you want, just make sure to point the URL from `settings.yml`correctly.
|
|
306
|
+
|
|
307
|
+
**I am making my plugin based on a sample inside the SDK, but somehow, the sample is not working properly, what do I do to run it in dev mode and make it work?**
|
|
308
|
+
Well there are several motives to why the sample is not working properly, so I will go through each one of them briefly:
|
|
309
|
+
|
|
310
|
+
- The config has not been set properly inside `bbb-html5.yml`, see [this section to configure your plugin](#running-the-plugin-from-source);
|
|
311
|
+
- The plugin is not even running in dev mode, it could be the port already in use, or typescript and/or javascript errors (Make sure to initialize the `pluginApi` as any of the samples inside a react function component);
|
|
312
|
+
- It could be an error with that sample indeed, or that feature the plugin uses broke (it is not usual, but can happen since BBB is constantly changing and enhancing its features with its wonderful community). If that happens, just open an issue in the [SDK's github](https://github.com/bigbluebutton/bigbluebutton-html-plugin-sdk) detailing the error you are facing. And thank you in advance for reporting it back to us so we can improve each time.
|
|
313
|
+
|
|
314
|
+
**How to troubleshoot the plugins? See if it has loaded in the BBB, for instance.**
|
|
315
|
+
Well, each time a set of plugins are listed in the `bbb-html5.yml`, it will fire some logs based on the amount of plugins that it need to load inside the client. So open the console in the browser by pressing F12 key in your keyboard and search for the following log:
|
|
316
|
+
|
|
317
|
+
```log
|
|
318
|
+
<ratio of loaded plugins> plugins loaded
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
If 1 out of 5 plugins loaded, you'll see "1/5 plugins loaded", and so on.
|
|
322
|
+
|
|
323
|
+
Also, when a plugin loaded, the client will log it's name like:
|
|
324
|
+
|
|
325
|
+
```log
|
|
326
|
+
Loaded plugin MyPlugin
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
Sometimes, there could be the case of a plugin to not load properly and an error will log with the following message:
|
|
330
|
+
|
|
331
|
+
```log
|
|
332
|
+
Error when loading plugin MyPlugin, error: {"isTrusted":true}
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
In this case, the URL that leads to the plugin is not available or leads to an error. But it can log something different, so pay attention to what the error message will tell you.
|
|
336
|
+
|
|
337
|
+
Lastly, there are, of course, other scenarios and different informative logs, but these are the most common and important ones. Please contact us if you feel we left something out!
|
|
@@ -19,6 +19,7 @@ export declare abstract class BbbPluginSdk {
|
|
|
19
19
|
*
|
|
20
20
|
*/
|
|
21
21
|
static initialize(uuid: string): void;
|
|
22
|
+
private static isReactEnvironment;
|
|
22
23
|
/**
|
|
23
24
|
* Returns the PluginApi. Use the PluginApi to access the hooks or setters functions for all the
|
|
24
25
|
* extensible areas. For a complete list of those, see README.md
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BbbPluginSdk = void 0;
|
|
4
|
+
/* eslint-disable no-console */
|
|
5
|
+
var react_1 = require("react");
|
|
4
6
|
var enums_1 = require("../../data-channel/enums");
|
|
5
7
|
var commands_1 = require("../../ui-commands/commands");
|
|
6
8
|
var hooks_1 = require("../../data-channel/hooks");
|
|
@@ -16,6 +18,7 @@ var hooks_7 = require("../../data-consumption/domain/chat/loaded-chat-messages/h
|
|
|
16
18
|
var hooks_8 = require("../../dom-element-manipulation/chat/message/hooks");
|
|
17
19
|
var hooks_9 = require("../../data-consumption/domain/user-voice/talking-indicator/hooks");
|
|
18
20
|
var hooks_10 = require("../../ui-data-hooks/hooks");
|
|
21
|
+
var hooks_11 = require("../../data-consumption/domain/meeting/from-core/hooks");
|
|
19
22
|
/**
|
|
20
23
|
* Class responsible for either initialize or get the PluginApi
|
|
21
24
|
*
|
|
@@ -38,11 +41,14 @@ var BbbPluginSdk = /** @class */ (function () {
|
|
|
38
41
|
*
|
|
39
42
|
*/
|
|
40
43
|
BbbPluginSdk.initialize = function (uuid) {
|
|
44
|
+
if (!this.isReactEnvironment())
|
|
45
|
+
throw new Error('Initializing pluginApi outside of a react function component. It should be done inside');
|
|
41
46
|
var pluginApi = window.bbb_plugins[uuid];
|
|
42
47
|
pluginApi.useCustomSubscription = (function (query, variablesObjectWrapper) { return (0, hooks_3.useCustomSubscription)(query, variablesObjectWrapper); });
|
|
43
48
|
pluginApi.useCurrentPresentation = (function () { return (0, hooks_2.useCurrentPresentation)(); });
|
|
44
49
|
pluginApi.useLoadedUserList = (function () { return (0, hooks_4.useLoadedUserList)(); });
|
|
45
50
|
pluginApi.useCurrentUser = (function () { return (0, hooks_5.useCurrentUser)(); });
|
|
51
|
+
pluginApi.useMeeting = (function () { return (0, hooks_11.useMeeting)(); });
|
|
46
52
|
pluginApi.useUsersBasicInfo = (function () { return (0, hooks_6.useUsersBasicInfo)(); });
|
|
47
53
|
pluginApi.useTalkingIndicator = (function () { return (0, hooks_9.useTalkingIndicator)(); });
|
|
48
54
|
pluginApi.useLoadedChatMessages = (function () { return (0, hooks_7.useLoadedChatMessages)(); });
|
|
@@ -62,6 +68,20 @@ var BbbPluginSdk = /** @class */ (function () {
|
|
|
62
68
|
throw new Error('Plugin name not set');
|
|
63
69
|
}
|
|
64
70
|
};
|
|
71
|
+
BbbPluginSdk.isReactEnvironment = function () {
|
|
72
|
+
var fn = console.error;
|
|
73
|
+
try {
|
|
74
|
+
console.error = function () { };
|
|
75
|
+
(0, react_1.useEffect)(function () { }, []);
|
|
76
|
+
}
|
|
77
|
+
catch (_a) {
|
|
78
|
+
console.error = fn;
|
|
79
|
+
console.error('[PLUGIN-ERROR] Error: Initializing pluginApi outside of a react function component. It should be done inside');
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
console.error = fn;
|
|
83
|
+
return true;
|
|
84
|
+
};
|
|
65
85
|
/**
|
|
66
86
|
* Returns the PluginApi. Use the PluginApi to access the hooks or setters functions for all the
|
|
67
87
|
* extensible areas. For a complete list of those, see README.md
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BbbPluginSdk.js","sourceRoot":"","sources":["../../../../src/core/api/BbbPluginSdk.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"BbbPluginSdk.js","sourceRoot":"","sources":["../../../../src/core/api/BbbPluginSdk.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,+BAAkC;AAOlC,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;AAE9F,0FAAuG;AACvG,oDAAsD;AAEtD,gFAAmF;AAInF;;;;;;GAMG;AACH;IAAA;IA2GA,CAAC;IA1GC;;;;;;;;;;OAUG;IACW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AE;YACxD,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG;gBACzB,wBAAwB,EAAE,cAAM,OAAA,EAAE,EAAF,CAAE;gBAClC,2BAA2B,EAAE,cAAM,OAAA,EAAE,EAAF,CAAE;gBACrC,4BAA4B,EAAE,cAAM,OAAA,EAAE,EAAF,CAAE;gBACtC,kBAAkB,EAAE,cAAM,OAAA,EAAE,EAAF,CAAE;gBAC5B,6BAA6B,EAAE,cAAM,OAAA,EAAE,EAAF,CAAE;gBACvC,4BAA4B,EAAE,cAAM,OAAA,EAAE,EAAF,CAAE;gBACtC,cAAc,EAAE,cAAM,OAAA,EAAE,EAAF,CAAE;gBACxB,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,oBAAoB,EAAE,cAAM,OAAA,EAAE,EAAF,CAAE;gBAC9B,uBAAuB,EAAE;oBACvB,EAAE,EAAE,cAAO,CAAC;iBACb;gBACD,eAAe,EAAE,cAAM,OAAA,IAAA,wBAAe,GAAE,EAAjB,CAAiB;gBACxC,UAAU,EAAE,UAAC,MAAM,IAAK,OAAA,IAAA,mBAAU,EAAC,MAAM,CAAC,EAAlB,CAAkB;gBAC1C,UAAU,YAAA;aACX,CAAC;SACH;QAED,OAAO,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;IACH,mBAAC;AAAD,CAAC,AA3GD,IA2GC;AA3GqB,oCAAY"}
|
|
@@ -25,6 +25,7 @@ import { UseLoadedChatMessagesFunction } from '../../data-consumption/domain/cha
|
|
|
25
25
|
import { UseTalkingIndicatorFunction } from '../../data-consumption/domain/user-voice/talking-indicator/types';
|
|
26
26
|
import { GenericComponentInterface } from '../../extensible-areas/generic-component/types';
|
|
27
27
|
import { UseUiDataFunction } from '../../ui-data-hooks/types';
|
|
28
|
+
import { UseMeetingFunction } from '../../data-consumption/domain/meeting/from-core/types';
|
|
28
29
|
export type SetPresentationToolbarItems = (presentationToolbarItem: PresentationToolbarInterface[]) => string[];
|
|
29
30
|
export type SetUserListDropdownItems = (userListDropdownItem: UserListDropdownInterface[]) => string[];
|
|
30
31
|
export type SetActionButtonDropdownItems = (actionButtonDropdownInterface: ActionButtonDropdownInterface[]) => string[];
|
|
@@ -79,6 +80,14 @@ export interface PluginApi {
|
|
|
79
80
|
*
|
|
80
81
|
*/
|
|
81
82
|
useCurrentUser?: UseCurrentUserFunction;
|
|
83
|
+
/**
|
|
84
|
+
* Returns an object containing the data on the current meeting, i.e. the meeting on which the
|
|
85
|
+
* plugin is running.
|
|
86
|
+
*
|
|
87
|
+
* @returns `GraphqlResponseWrapper` with the CurrentMeeting type.
|
|
88
|
+
*
|
|
89
|
+
*/
|
|
90
|
+
useMeeting?: UseMeetingFunction;
|
|
82
91
|
/**
|
|
83
92
|
* Returns an object containing the brief data on every user in te meeting.
|
|
84
93
|
*
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useMeeting = void 0;
|
|
4
|
+
var enums_1 = require("../../../enums");
|
|
5
|
+
var hookCreator_1 = require("../../../factory/hookCreator");
|
|
6
|
+
var useMeeting = function () { return (0, hookCreator_1.createDataConsumptionHook)(enums_1.DataConsumptionHooks.MEETING); };
|
|
7
|
+
exports.useMeeting = useMeeting;
|
|
8
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../../../../src/data-consumption/domain/meeting/from-core/hooks.ts"],"names":[],"mappings":";;;AAAA,wCAAsD;AACtD,4DAAyE;AAGlE,IAAM,UAAU,GAAG,cAAM,OAAA,IAAA,uCAAyB,EAGvD,4BAAoB,CAAC,OAAO,CAC7B,EAJ+B,CAI/B,CAAC;AAJW,QAAA,UAAU,cAIrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/data-consumption/domain/meeting/from-core/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Meeting } from './from-core/types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/data-consumption/domain/meeting/index.ts"],"names":[],"mappings":""}
|
|
@@ -3,6 +3,7 @@ export declare enum DataConsumptionHooks {
|
|
|
3
3
|
LOADED_USER_LIST = "Hooks::UseLoadedUserList",
|
|
4
4
|
CURRENT_USER = "Hooks::UseCurrentUser",
|
|
5
5
|
LOADED_CHAT_MESSAGES = "Hooks::UseLoadedChatMessages",
|
|
6
|
+
MEETING = "Hooks::UseMeeting",
|
|
6
7
|
TALKING_INDICATOR = "Hooks::UseTalkingIndicator",
|
|
7
8
|
CUSTOM_SUBSCRIPTION = "Hooks::CustomSubscription"
|
|
8
9
|
}
|
|
@@ -7,6 +7,7 @@ var DataConsumptionHooks;
|
|
|
7
7
|
DataConsumptionHooks["LOADED_USER_LIST"] = "Hooks::UseLoadedUserList";
|
|
8
8
|
DataConsumptionHooks["CURRENT_USER"] = "Hooks::UseCurrentUser";
|
|
9
9
|
DataConsumptionHooks["LOADED_CHAT_MESSAGES"] = "Hooks::UseLoadedChatMessages";
|
|
10
|
+
DataConsumptionHooks["MEETING"] = "Hooks::UseMeeting";
|
|
10
11
|
DataConsumptionHooks["TALKING_INDICATOR"] = "Hooks::UseTalkingIndicator";
|
|
11
12
|
DataConsumptionHooks["CUSTOM_SUBSCRIPTION"] = "Hooks::CustomSubscription";
|
|
12
13
|
})(DataConsumptionHooks || (exports.DataConsumptionHooks = DataConsumptionHooks = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../../src/data-consumption/enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../../src/data-consumption/enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,oBAQX;AARD,WAAY,oBAAoB;IAC9B,8EAAsD,CAAA;IACtD,qEAA6C,CAAA;IAC7C,8DAAsC,CAAA;IACtC,6EAAqD,CAAA;IACrD,qDAA6B,CAAA;IAC7B,wEAAgD,CAAA;IAChD,yEAAiD,CAAA;AACnD,CAAC,EARW,oBAAoB,oCAApB,oBAAoB,QAQ/B"}
|
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./domain/presentations"), exports);
|
|
18
18
|
__exportStar(require("./domain/chat"), exports);
|
|
19
|
+
__exportStar(require("./domain/meeting"), exports);
|
|
19
20
|
__exportStar(require("./domain/users"), exports);
|
|
20
21
|
__exportStar(require("./domain/user-voice"), exports);
|
|
21
22
|
__exportStar(require("./domain/shared"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/data-consumption/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,gDAA8B;AAC9B,iDAA+B;AAC/B,sDAAoC;AACpC,kDAAgC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/data-consumption/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,gDAA8B;AAC9B,mDAAiC;AACjC,iDAA+B;AAC/B,sDAAoC;AACpC,kDAAgC"}
|
package/dist/cjs/index.d.ts
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -19,4 +19,5 @@ __exportStar(require("./data-consumption"), exports);
|
|
|
19
19
|
__exportStar(require("./data-channel"), exports);
|
|
20
20
|
__exportStar(require("./ui-data-hooks"), exports);
|
|
21
21
|
__exportStar(require("./core"), exports);
|
|
22
|
+
__exportStar(require("./utils"), exports);
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AAEnC,qDAAmC;AAEnC,iDAA+B;AAE/B,kDAAgC;AAEhC,yCAAuB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AAEnC,qDAAmC;AAEnC,iDAA+B;AAE/B,kDAAgC;AAEhC,yCAAuB;AAEvB,0CAAwB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.pluginLogger = void 0;
|
|
7
|
+
var logger_1 = __importDefault(require("./logger/logger"));
|
|
8
|
+
exports.pluginLogger = logger_1.default;
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;;;;AAAA,2DAA2C;AAElC,uBAFF,gBAAY,CAEE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var browser_bunyan_1 = require("browser-bunyan");
|
|
4
|
+
var console_formatted_stream_1 = require("@browser-bunyan/console-formatted-stream");
|
|
5
|
+
var pluginLogger = (0, browser_bunyan_1.createLogger)({
|
|
6
|
+
name: 'PluginLogger',
|
|
7
|
+
streams: [
|
|
8
|
+
{
|
|
9
|
+
level: browser_bunyan_1.INFO,
|
|
10
|
+
stream: new console_formatted_stream_1.ConsoleFormattedStream(),
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
serializers: browser_bunyan_1.stdSerializers,
|
|
14
|
+
src: true,
|
|
15
|
+
});
|
|
16
|
+
exports.default = pluginLogger;
|
|
17
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../../src/utils/logger/logger.ts"],"names":[],"mappings":";;AAAA,iDAAoE;AACpE,qFAAkF;AAElF,IAAM,YAAY,GAAG,IAAA,6BAAY,EAAC;IAChC,IAAI,EAAE,cAAc;IACpB,OAAO,EAAE;QACP;YACE,KAAK,EAAE,qBAAI;YACX,MAAM,EAAE,IAAI,iDAAsB,EAAE;SACrC;KACF;IAED,WAAW,EAAE,+BAAc;IAC3B,GAAG,EAAE,IAAI;CACV,CAAC,CAAC;AAEH,kBAAe,YAAY,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bigbluebutton-html-plugin-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.48",
|
|
4
4
|
"homepage": "https://github.com/bigbluebutton/bigbluebutton-html-plugin-sdk",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -59,6 +59,8 @@
|
|
|
59
59
|
"apollo"
|
|
60
60
|
],
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@apollo/client": "^3.8.7"
|
|
62
|
+
"@apollo/client": "^3.8.7",
|
|
63
|
+
"@browser-bunyan/console-formatted-stream": "^1.8.0",
|
|
64
|
+
"browser-bunyan": "^1.8.0"
|
|
63
65
|
}
|
|
64
66
|
}
|