bigbluebutton-html-plugin-sdk 0.0.47 → 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 CHANGED
@@ -78,6 +78,21 @@ In this case, the `<<PLUGIN_URL>>` will be `https://<your-host>/plugins/SampleAc
78
78
 
79
79
  ### Extensible UI areas
80
80
 
81
+ Foreach of the following ui-extensible-area, we have a different setter function accessible via `pluginApi`.
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:
84
+
85
+ ```ts
86
+ pluginApi.setterFunctionExample([{
87
+ objectProperty1: 'string',
88
+ objectProperty2: 123,
89
+ }])
90
+ ```
91
+
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.
93
+
94
+ That being said, here are the extensible areas we have so far:
95
+
81
96
  - Action bar items (button, separator)
82
97
  - Action Button Dropdown Items (option, separator)
83
98
  - Audio settings dropdown items (option, separator)
@@ -91,6 +106,8 @@ In this case, the `<<PLUGIN_URL>>` will be `https://<your-host>/plugins/SampleAc
91
106
  - Floating window item (floatingWindow)
92
107
  - Generic component (genericComponent)
93
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
+
94
111
  ### Getters available through the API:
95
112
 
96
113
  - `getSessionToken`: returns the user session token located on the user's URL.
@@ -108,6 +125,19 @@ In this case, the `<<PLUGIN_URL>>` will be `https://<your-host>/plugins/SampleAc
108
125
  - `useTalkingIndicator` hook: it gives you invormation on the user-voice data, that is, who is talking or muted.
109
126
  - `useMeeting` hook: it gives you information on the current meeting that the user is on.
110
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
+
140
+
111
141
  ### Real time data exchange
112
142
 
113
143
  - `useDataChannel` hook: this will allow you to exchange information (Send and receive) amongst different users through the same plugin;
@@ -181,13 +211,21 @@ export type ObjectTo = ToUserId | ToRole;
181
211
 
182
212
  Example of usage:
183
213
 
184
- ```typscript
185
- const currentLocale = pluginApi.useUiData(IntlLocaleUiDataNames.CURRENT_LOCALE, {
214
+ ```ts
215
+ const currentLocale = pluginApi.useUiData(IntlLocaleUiDataNames.CURRENT_LOCALE, {
186
216
  locale: 'en',
187
217
  fallbackLocale: 'en',
188
218
  });
219
+ // Do something with the currentLocale:
220
+ currentLocale.locale;
221
+ currentLocale.fallbackLocale;
222
+
189
223
  ```
190
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
+
191
229
  ### Ui Commands to automatize tasks in BBB
192
230
 
193
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:
@@ -199,10 +237,101 @@ const currentLocale = pluginApi.useUiData(IntlLocaleUiDataNames.CURRENT_LOCALE,
199
237
  - external-video:
200
238
  - volume:
201
239
  - set: this function will set the external video volume to a certain number between 0 and 1 (that is 0% and);
202
- - layout:
203
- - set: This function set the current layout with its argument (example: LayoutComponentListEnum.GENERIC_COMPONENT)
204
- - unset: This function unset the current layout with its argument (example: LayoutComponentListEnum.GENERIC_COMPONENT)
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
205
251
 
206
252
  ### Dom Element Manipulation
207
253
 
208
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");
@@ -39,6 +41,8 @@ var BbbPluginSdk = /** @class */ (function () {
39
41
  *
40
42
  */
41
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');
42
46
  var pluginApi = window.bbb_plugins[uuid];
43
47
  pluginApi.useCustomSubscription = (function (query, variablesObjectWrapper) { return (0, hooks_3.useCustomSubscription)(query, variablesObjectWrapper); });
44
48
  pluginApi.useCurrentPresentation = (function () { return (0, hooks_2.useCurrentPresentation)(); });
@@ -64,6 +68,20 @@ var BbbPluginSdk = /** @class */ (function () {
64
68
  throw new Error('Plugin name not set');
65
69
  }
66
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
+ };
67
85
  /**
68
86
  * Returns the PluginApi. Use the PluginApi to access the hooks or setters functions for all the
69
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":";;;AAMA,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;IA4FA,CAAC;IA3FC;;;;;;;;;;OAUG;IACW,uBAAU,GAAxB,UAAyB,IAAY;QACnC,IAAM,SAAS,GAAc,M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;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"}
@@ -3,3 +3,4 @@ export * from './data-consumption';
3
3
  export * from './data-channel';
4
4
  export * from './ui-data-hooks';
5
5
  export * from './core';
6
+ export * from './utils';
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
@@ -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,2 @@
1
+ import pluginLogger from './logger/logger';
2
+ export { pluginLogger };
@@ -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,2 @@
1
+ declare const pluginLogger: import("browser-bunyan").Logger;
2
+ export default pluginLogger;
@@ -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.47",
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
  }