bigbluebutton-html-plugin-sdk 0.0.71 → 0.0.72
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 +23 -6
- package/dist/cjs/core/api/BbbPluginSdk.js +0 -2
- package/dist/cjs/core/api/BbbPluginSdk.js.map +1 -1
- package/dist/cjs/core/api/types.d.ts +0 -8
- package/package.json +1 -1
- package/dist/cjs/asset-persistence/enums.d.ts +0 -6
- package/dist/cjs/asset-persistence/enums.js +0 -12
- package/dist/cjs/asset-persistence/enums.js.map +0 -1
- package/dist/cjs/asset-persistence/hook.d.ts +0 -2
- package/dist/cjs/asset-persistence/hook.js +0 -16
- package/dist/cjs/asset-persistence/hook.js.map +0 -1
- package/dist/cjs/asset-persistence/types.d.ts +0 -8
- package/dist/cjs/asset-persistence/types.js +0 -3
- package/dist/cjs/asset-persistence/types.js.map +0 -1
package/README.md
CHANGED
|
@@ -94,7 +94,7 @@ follow these steps:
|
|
|
94
94
|
|
|
95
95
|
```bash
|
|
96
96
|
cd $HOME/src/bigbluebutton-html-plugin-sdk/samples/sample-action-button-dropdown-plugin
|
|
97
|
-
npm
|
|
97
|
+
npm ci
|
|
98
98
|
npm run build-bundle
|
|
99
99
|
```
|
|
100
100
|
|
|
@@ -142,7 +142,7 @@ Here is as complete `manifet.json` example with all possible configurations:
|
|
|
142
142
|
{
|
|
143
143
|
"name": "allUsers",
|
|
144
144
|
"url": "${meta_pluginSettingsUserInformation}",
|
|
145
|
-
"fetchMode": "onMeetingCreate",
|
|
145
|
+
"fetchMode": "onMeetingCreate", // Possible values: "onMeetingCreate", "onDemand"
|
|
146
146
|
"permissions": ["moderator", "viewer"]
|
|
147
147
|
}
|
|
148
148
|
]
|
|
@@ -397,21 +397,32 @@ This is possible by simply configuring the dataResource name in the manifest and
|
|
|
397
397
|
{
|
|
398
398
|
"name": "allUsers",
|
|
399
399
|
"url": "${meta_pluginSettingsUserInformation}",
|
|
400
|
-
"fetchMode": "onMeetingCreate",
|
|
401
|
-
"permissions": ["moderator", "viewer"]
|
|
400
|
+
"fetchMode": "onMeetingCreate", // Possible values: "onMeetingCreate", "onDemand"
|
|
401
|
+
"permissions": ["moderator", "viewer"] // Possible values: "moderator", "viewer", "presenter"
|
|
402
402
|
}
|
|
403
403
|
]
|
|
404
404
|
}
|
|
405
405
|
```
|
|
406
406
|
|
|
407
|
-
|
|
407
|
+
Going through each parameter to better understand it's structure:
|
|
408
|
+
|
|
409
|
+
- `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;
|
|
410
|
+
- `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);
|
|
411
|
+
- `fetchMode`: It tells the plugin-server if it should fetch the data only when creating the meeting, or everytime the function is called in the plugin portion;
|
|
412
|
+
- 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 everytime the plugin wants that data, the plugin-server will respond with the cached data;
|
|
413
|
+
- On the other hand, if `onDemand` is selected, everytime the plugin calls this method, the plugin-server will fetch the data and then proxy it to the plugin;
|
|
414
|
+
- `permissions`: This tells the back-end which role of the meeting can access this remote data;
|
|
415
|
+
|
|
416
|
+
Here is the `/create` parameters you would have to pass to make this remote-data-source api work:
|
|
408
417
|
|
|
409
418
|
```
|
|
410
419
|
meta_pluginSettingsUserInformation=https://<your-external-source-with-your-authentication>/api/users
|
|
411
420
|
pluginManifests=[{"url": "http://<domain-of-your-manifest>/your-plugin/manifest.json"}]
|
|
412
421
|
```
|
|
413
422
|
|
|
414
|
-
|
|
423
|
+
See that we send the `meta_` parameter, for more information, refer to the [meta parameters section](#meta_-parameters)
|
|
424
|
+
|
|
425
|
+
Lastly, in the plugin, just use the function like:
|
|
415
426
|
|
|
416
427
|
```typescript
|
|
417
428
|
pluginApi.getRemoteData('allUsers').then((response: Response) => {
|
|
@@ -427,6 +438,12 @@ pluginApi.getRemoteData('allUsers').then((response: Response) => {
|
|
|
427
438
|
});
|
|
428
439
|
```
|
|
429
440
|
|
|
441
|
+
### Meta_ parameters
|
|
442
|
+
|
|
443
|
+
This is not part of the API, but it's a way of passing information to the manifest. Any value can be passed like this, one just needs to put something like `${meta_nameOfParameter}` in a specific config of the manifest, and in the `/create` call, set this meta-parameter to whatever is preferred, like `meta_nameOfParameter="Sample message"`
|
|
444
|
+
|
|
445
|
+
This feature is mainly used for security purposes, see [external data section](#external-data-resources). But can be used for customization reasons as well.
|
|
446
|
+
|
|
430
447
|
### Event persistence
|
|
431
448
|
|
|
432
449
|
This feature will allow the developer to save an information (which is basically an event) in the `event.xml` file of the meeting if it's being recorded.
|
|
@@ -24,7 +24,6 @@ var commands_2 = require("../../server-commands/commands");
|
|
|
24
24
|
var hooks_13 = require("../../learning-analytics-dashboard/hooks");
|
|
25
25
|
var utils_1 = require("../../remote-data/utils");
|
|
26
26
|
var hooks_14 = require("../../event-persistence/hooks");
|
|
27
|
-
var hook_1 = require("../../asset-persistence/hook");
|
|
28
27
|
/**
|
|
29
28
|
* Class responsible for either initialize or get the PluginApi
|
|
30
29
|
*
|
|
@@ -74,7 +73,6 @@ var BbbPluginSdk = /** @class */ (function () {
|
|
|
74
73
|
pluginApi.sendGenericDataForLearningAnalyticsDashboard = function (data) { return (0, hooks_13.sendGenericDataForLearningAnalyticsDashboard)(data, pluginName); };
|
|
75
74
|
pluginApi.getRemoteData = function (dataSourceName) { return (0, utils_1.getRemoteData)(dataSourceName, pluginName); };
|
|
76
75
|
pluginApi.persistEvent = function (eventName, payload) { return (0, hooks_14.persistEventFunctionWrapper)(pluginName, eventName, payload); };
|
|
77
|
-
pluginApi.persistAsset = function (assetUrl, typeOfAsset, assetName) { return (0, hook_1.persistAssetFunctionWrapper)(pluginName, assetUrl, typeOfAsset, assetName); };
|
|
78
76
|
}
|
|
79
77
|
else {
|
|
80
78
|
throw new Error('Plugin name not set');
|
|
@@ -1 +1 @@
|
|
|
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;AAC9F,0EAA4F;AAE5F,2FAAuG;AACvG,oDAAsD;AAEtD,gFAAmF;AACnF,2DAAgE;AAChE,mEAAwG;AAExG,iDAAwD;AACxD,wDAA4E;
|
|
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;AAC9F,0EAA4F;AAE5F,2FAAuG;AACvG,oDAAsD;AAEtD,gFAAmF;AACnF,2DAAgE;AAChE,mEAAwG;AAExG,iDAAwD;AACxD,wDAA4E;AAI5E;;;;;;GAMG;AACH;IAAA;IA+HA,CAAC;IA9HC;;;;;;;;;;OAUG;IACW,uBAAU,GAAxB,UAAyB,IAAY;QACnC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,wFAAwF,CAAC,CAAC;QAC1I,IAAM,SAAS,GAAc,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACtD,SAAS,CAAC,qBAAqB,GAAG,CAAC,UACjC,KAAa,EACb,sBAAsD,IACnD,OAAA,IAAA,6BAAqB,EAAC,KAAK,EAAE,sBAAsB,CAAC,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AU,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,AA/HD,IA+HC;AA/HqB,oCAAY"}
|
|
@@ -32,7 +32,6 @@ import { UseUserCameraDomElementsFunction } from '../../dom-element-manipulation
|
|
|
32
32
|
import { ScreenshareHelperInterface, UserCameraHelperInterface } from '../../extensible-areas';
|
|
33
33
|
import { GetDataSource } from '../../remote-data/types';
|
|
34
34
|
import { PersistEventFunction } from '../../event-persistence/types';
|
|
35
|
-
import { PersistAssetFunction } from '../../asset-persistence/types';
|
|
36
35
|
export type SetPresentationToolbarItems = (presentationToolbarItem: PresentationToolbarInterface[]) => string[];
|
|
37
36
|
export type SetUserListDropdownItems = (userListDropdownItem: UserListDropdownInterface[]) => string[];
|
|
38
37
|
export type SetActionButtonDropdownItems = (actionButtonDropdownInterface: ActionButtonDropdownInterface[]) => string[];
|
|
@@ -209,13 +208,6 @@ export interface PluginApi {
|
|
|
209
208
|
*
|
|
210
209
|
*/
|
|
211
210
|
persistEvent?: PersistEventFunction;
|
|
212
|
-
/**
|
|
213
|
-
* Persists assets to the current meeting, e.g.: presentation.
|
|
214
|
-
*
|
|
215
|
-
* @param payload - payload to be persisted in `events.xml`
|
|
216
|
-
*
|
|
217
|
-
*/
|
|
218
|
-
persistAsset?: PersistAssetFunction;
|
|
219
211
|
}
|
|
220
212
|
export interface PluginBrowserWindow extends Window {
|
|
221
213
|
bbb_plugins: {
|
package/package.json
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AssetType = exports.AssetPersistenceEvents = void 0;
|
|
4
|
-
var AssetPersistenceEvents;
|
|
5
|
-
(function (AssetPersistenceEvents) {
|
|
6
|
-
AssetPersistenceEvents["ASSET_PERSISTED"] = "PLUGIN_ASSET_PERSISTED";
|
|
7
|
-
})(AssetPersistenceEvents || (exports.AssetPersistenceEvents = AssetPersistenceEvents = {}));
|
|
8
|
-
var AssetType;
|
|
9
|
-
(function (AssetType) {
|
|
10
|
-
AssetType["PRESENTATION"] = "PLUGIN_ASSET_PERSISTENCE_TYPE_PRESENTATION";
|
|
11
|
-
})(AssetType || (exports.AssetType = AssetType = {}));
|
|
12
|
-
//# sourceMappingURL=enums.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../../src/asset-persistence/enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,sBAEX;AAFD,WAAY,sBAAsB;IAChC,oEAA0C,CAAA;AAC5C,CAAC,EAFW,sBAAsB,sCAAtB,sBAAsB,QAEjC;AAED,IAAY,SAEX;AAFD,WAAY,SAAS;IACnB,wEAA2D,CAAA;AAC7D,CAAC,EAFW,SAAS,yBAAT,SAAS,QAEpB"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.persistAssetFunctionWrapper = void 0;
|
|
4
|
-
var enums_1 = require("./enums");
|
|
5
|
-
var persistAssetFunctionWrapper = function (pluginName, assetUrl, typeOfAsset, assetName) {
|
|
6
|
-
window.dispatchEvent(new CustomEvent(enums_1.AssetPersistenceEvents.ASSET_PERSISTED, {
|
|
7
|
-
detail: {
|
|
8
|
-
pluginName: pluginName,
|
|
9
|
-
assetUrl: assetUrl,
|
|
10
|
-
typeOfAsset: typeOfAsset,
|
|
11
|
-
assetName: assetName,
|
|
12
|
-
},
|
|
13
|
-
}));
|
|
14
|
-
};
|
|
15
|
-
exports.persistAssetFunctionWrapper = persistAssetFunctionWrapper;
|
|
16
|
-
//# sourceMappingURL=hook.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hook.js","sourceRoot":"","sources":["../../../src/asset-persistence/hook.ts"],"names":[],"mappings":";;;AAGA,iCAA4D;AAErD,IAAM,2BAA2B,GAAG,UACzC,UAAkB,EAClB,QAAgB,EAChB,WAAsB,EACtB,SAAkB;IAElB,MAAM,CAAC,aAAa,CAClB,IAAI,WAAW,CACU,8BAAsB,CAAC,eAAe,EAAE;QAC/D,MAAM,EAAE;YACN,UAAU,YAAA;YACV,QAAQ,UAAA;YACR,WAAW,aAAA;YACX,SAAS,WAAA;SACV;KACF,CAAC,CACH,CAAC;AACJ,CAAC,CAAC;AAjBW,QAAA,2BAA2B,+BAiBtC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { AssetType } from './enums';
|
|
2
|
-
export interface AssetPersistenceDetails {
|
|
3
|
-
pluginName: string;
|
|
4
|
-
assetUrl: string;
|
|
5
|
-
typeOfAsset: AssetType;
|
|
6
|
-
assetName?: string;
|
|
7
|
-
}
|
|
8
|
-
export type PersistAssetFunction = (assetUrl: string, typeOfAsset: AssetType, assetName?: string) => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/asset-persistence/types.ts"],"names":[],"mappings":""}
|