bigbluebutton-html-plugin-sdk 0.0.31 → 0.0.33
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 +8 -0
- package/dist/cjs/core/api/BbbPluginSdk.js +4 -0
- package/dist/cjs/core/api/BbbPluginSdk.js.map +1 -1
- package/dist/cjs/core/api/types.d.ts +19 -0
- package/dist/cjs/core/enum.d.ts +3 -2
- package/dist/cjs/core/enum.js.map +1 -1
- package/dist/cjs/core/types.d.ts +2 -1
- package/dist/cjs/data-consumption/domain/user-voice/index.d.ts +1 -0
- package/dist/cjs/data-consumption/domain/user-voice/index.js +3 -0
- package/dist/cjs/data-consumption/domain/user-voice/index.js.map +1 -0
- package/dist/cjs/data-consumption/domain/user-voice/talking-indicator/hooks.d.ts +2 -0
- package/dist/cjs/data-consumption/domain/user-voice/talking-indicator/hooks.js +8 -0
- package/dist/cjs/data-consumption/domain/user-voice/talking-indicator/hooks.js.map +1 -0
- package/dist/cjs/data-consumption/domain/user-voice/talking-indicator/types.d.ts +8 -0
- package/dist/cjs/data-consumption/domain/user-voice/talking-indicator/types.js +3 -0
- package/dist/cjs/data-consumption/domain/user-voice/talking-indicator/types.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/dom-element-manipulation/chat/message/hooks.d.ts +1 -0
- package/dist/cjs/dom-element-manipulation/chat/message/hooks.js +55 -0
- package/dist/cjs/dom-element-manipulation/chat/message/hooks.js.map +1 -0
- package/dist/cjs/dom-element-manipulation/chat/message/types.d.ts +8 -0
- package/dist/cjs/dom-element-manipulation/chat/message/types.js +3 -0
- package/dist/cjs/dom-element-manipulation/chat/message/types.js.map +1 -0
- package/dist/cjs/dom-element-manipulation/enums.d.ts +3 -0
- package/dist/cjs/dom-element-manipulation/enums.js +8 -0
- package/dist/cjs/dom-element-manipulation/enums.js.map +1 -0
- package/dist/cjs/dom-element-manipulation/type.d.ts +2 -0
- package/dist/cjs/dom-element-manipulation/type.js +3 -0
- package/dist/cjs/dom-element-manipulation/type.js.map +1 -0
- package/dist/cjs/ui-commands/commands.d.ts +5 -0
- package/dist/cjs/ui-commands/commands.js +2 -0
- package/dist/cjs/ui-commands/commands.js.map +1 -1
- package/dist/cjs/ui-commands/external-video/commands.d.ts +5 -0
- package/dist/cjs/ui-commands/external-video/commands.js +8 -0
- package/dist/cjs/ui-commands/external-video/commands.js.map +1 -0
- package/dist/cjs/ui-commands/external-video/types.d.ts +4 -0
- package/dist/cjs/ui-commands/external-video/types.js +3 -0
- package/dist/cjs/ui-commands/external-video/types.js.map +1 -0
- package/dist/cjs/ui-commands/external-video/volume/commands.d.ts +10 -0
- package/dist/cjs/ui-commands/external-video/volume/commands.js +24 -0
- package/dist/cjs/ui-commands/external-video/volume/commands.js.map +1 -0
- package/dist/cjs/ui-commands/external-video/volume/enums.d.ts +3 -0
- package/dist/cjs/ui-commands/external-video/volume/enums.js +8 -0
- package/dist/cjs/ui-commands/external-video/volume/enums.js.map +1 -0
- package/dist/cjs/ui-commands/external-video/volume/types.d.ts +6 -0
- package/dist/cjs/ui-commands/external-video/volume/types.js +3 -0
- package/dist/cjs/ui-commands/external-video/volume/types.js.map +1 -0
- package/dist/cjs/ui-commands/types.d.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -48,6 +48,8 @@ SDK for developing BigBlueButton plugins, examples of implementations can be fou
|
|
|
48
48
|
|
|
49
49
|
- `usePluginSettings` hook: it provides all the specific settings regarding the current plugin it's been loaded from.
|
|
50
50
|
|
|
51
|
+
- `useTalkingIndicator` hook: it gives you invormation on the user-voice data, that is, who is talking or muted.
|
|
52
|
+
|
|
51
53
|
### Real time data exchange
|
|
52
54
|
- `useDataChannel` hook: this will allow you to exchange information (Send and receive) amongst different users through the same plugin;
|
|
53
55
|
|
|
@@ -60,3 +62,9 @@ SDK for developing BigBlueButton plugins, examples of implementations can be fou
|
|
|
60
62
|
- form:
|
|
61
63
|
- open: this function will open the sidebar chat panel automatically;
|
|
62
64
|
- fill: this function will fill the form input field of the chat passed in the argument as {text: string}
|
|
65
|
+
- external-video:
|
|
66
|
+
- volume:
|
|
67
|
+
- set: this function will set the external video volume to a certain number between 0 and 1 (that is 0% and);
|
|
68
|
+
|
|
69
|
+
### Dom Element Manipulation
|
|
70
|
+
- `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.;
|
|
@@ -13,6 +13,8 @@ var getter_2 = require("../auxiliary/join-url/getter");
|
|
|
13
13
|
var settings_1 = require("../../data-consumption/domain/settings");
|
|
14
14
|
var hooks_7 = require("../../ui-events/hooks");
|
|
15
15
|
var hooks_8 = require("../../data-consumption/domain/chat/loaded-chat-messages/hooks");
|
|
16
|
+
var hooks_9 = require("../../dom-element-manipulation/chat/message/hooks");
|
|
17
|
+
var hooks_10 = require("../../data-consumption/domain/user-voice/talking-indicator/hooks");
|
|
16
18
|
/**
|
|
17
19
|
* Class responsible for either initialize or get the PluginApi
|
|
18
20
|
*
|
|
@@ -41,8 +43,10 @@ var BbbPluginSdk = /** @class */ (function () {
|
|
|
41
43
|
pluginApi.useLoadedUserList = (function () { return (0, hooks_4.useLoadedUserList)(); });
|
|
42
44
|
pluginApi.useCurrentUser = (function () { return (0, hooks_5.useCurrentUser)(); });
|
|
43
45
|
pluginApi.useUsersBasicInfo = (function () { return (0, hooks_6.useUsersBasicInfo)(); });
|
|
46
|
+
pluginApi.useTalkingIndicator = (function () { return (0, hooks_10.useTalkingIndicator)(); });
|
|
44
47
|
pluginApi.useLoadedChatMessages = (function () { return (0, hooks_8.useLoadedChatMessages)(); });
|
|
45
48
|
pluginApi.useUiEvent = (function (eventName, callback) { return (0, hooks_7.useUiEvent)(eventName, callback); });
|
|
49
|
+
pluginApi.useChatMessageDomElements = function (messageIds) { return (0, hooks_9.useChatMessageDomElements)(messageIds); };
|
|
46
50
|
pluginApi.uiCommands = commands_1.uiCommands;
|
|
47
51
|
var pluginName = pluginApi === null || pluginApi === void 0 ? void 0 : pluginApi.pluginName;
|
|
48
52
|
if (pluginName) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BbbPluginSdk.js","sourceRoot":"","sources":["../../../../src/core/api/BbbPluginSdk.ts"],"names":[],"mappings":";;;AAYA,uDAAwD;AAQxD,kDAA0D;AAC1D,gGAEgF;AAChF,wFAEwE;AACxE,oFAA+F;AAC/F,gFAAwF;AACxF,oFAA+F;AAC/F,4DAAoE;AACpE,uDAA0D;AAC1D,mEAA2E;AAE3E,+CAAmD;AAEnD,uFAAsG;
|
|
1
|
+
{"version":3,"file":"BbbPluginSdk.js","sourceRoot":"","sources":["../../../../src/core/api/BbbPluginSdk.ts"],"names":[],"mappings":";;;AAYA,uDAAwD;AAQxD,kDAA0D;AAC1D,gGAEgF;AAChF,wFAEwE;AACxE,oFAA+F;AAC/F,gFAAwF;AACxF,oFAA+F;AAC/F,4DAAoE;AACpE,uDAA0D;AAC1D,mEAA2E;AAE3E,+CAAmD;AAEnD,uFAAsG;AACtG,2EAA8F;AAE9F,2FAAuG;AAIvG;;;;;;GAMG;AACH;IAAA;IAwFA,CAAC;IAvFC;;;;;;;;;;OAUG;IACW,uBAAU,GAAxB,UAAyB,IAAY;QACnC,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,EAApD,CAAoD,CAAkC,CAAC;QAC5F,SAAS,CAAC,sBAAsB,GAAG,CACjC,cAAM,OAAA,IAAA,8BAAsB,GAAE,EAAxB,C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AC,CAAC;SACxC;IACH,CAAC;IAED;;;;;;;;;;;;OAYG;IACW,yBAAY,GAA1B,UAA2B,IAAY,EAAE,UAAmB;QAC1D,IAAI,CAAC,MAAM,CAAC,WAAW;YAAE,MAAM,CAAC,WAAW,GAAG,EAAE,CAAC;QACjD,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE;YACxD,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG;gBACzB,wBAAwB,EAAE,cAAO,CAAC;gBAClC,2BAA2B,EAAE,cAAO,CAAC;gBACrC,4BAA4B,EAAE,cAAO,CAAC;gBACtC,kBAAkB,EAAE,cAAO,CAAC;gBAC5B,6BAA6B,EAAE,cAAO,CAAC;gBACvC,4BAA4B,EAAE,cAAO,CAAC;gBACtC,cAAc,EAAE,cAAO,CAAC;gBACxB,uBAAuB,EAAE,cAAO,CAAC;gBACjC,8BAA8B,EAAE,cAAO,CAAC;gBACxC,0BAA0B,EAAE,cAAO,CAAC;gBACpC,oCAAoC,EAAE,cAAO,CAAC;gBAC9C,kBAAkB,EAAE,cAAO,CAAC;gBAC5B,gBAAgB,EAAE;oBAChB,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,AAxFD,IAwFC;AAxFqB,oCAAY"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { UiCommands } from '../../ui-commands/types';
|
|
2
|
+
import { UseChatMessageDomElementsFunction } from '../../dom-element-manipulation/chat/message/types';
|
|
2
3
|
import { ActionButtonDropdownItem } from '../../extensible-areas/action-button-dropdown-item/types';
|
|
3
4
|
import { ActionsBarItem } from '../../extensible-areas/actions-bar-item/types';
|
|
4
5
|
import { AudioSettingsDropdownItem } from '../../extensible-areas/audio-settings-dropdown-item/types';
|
|
@@ -22,6 +23,7 @@ import { GetJoinUrlFunction } from '../auxiliary/join-url/types';
|
|
|
22
23
|
import { UsePluginSettingsFunction } from '../../data-consumption/domain/settings/plugin-settings/types';
|
|
23
24
|
import { UseUiEventFunction } from '../../ui-events/types';
|
|
24
25
|
import { UseLoadedChatMessagesFunction } from '../../data-consumption/domain/chat/loaded-chat-messages/types';
|
|
26
|
+
import { UseTalkingIndicatorFunction } from '../../data-consumption/domain/user-voice/talking-indicator/types';
|
|
25
27
|
export type SetPresentationToolbarItems = (presentationToolbarItem: PresentationToolbarItem[]) => void;
|
|
26
28
|
export type SetUserListDropdownItems = (userListDropdownItem: UserListDropdownItem[]) => void;
|
|
27
29
|
export type SetActionButtonDropdownItems = (actionButtonDropdownItem: ActionButtonDropdownItem[]) => void;
|
|
@@ -97,6 +99,14 @@ export interface PluginApi {
|
|
|
97
99
|
*
|
|
98
100
|
*/
|
|
99
101
|
usePluginSettings?: UsePluginSettingsFunction;
|
|
102
|
+
/**
|
|
103
|
+
* Returns an object containing a list user-voice with the main properties of that object,
|
|
104
|
+
* that being talking (boolean), startTime (number), muted (boolean) and userId (string).
|
|
105
|
+
*
|
|
106
|
+
* @returns `GraphqlResponseWrapper` with the list of user-voice.
|
|
107
|
+
*
|
|
108
|
+
*/
|
|
109
|
+
useTalkingIndicator?: UseTalkingIndicatorFunction;
|
|
100
110
|
/**
|
|
101
111
|
* Returns an object containing the data on the current presentation being displayed
|
|
102
112
|
* in the presentation area, and its current page.
|
|
@@ -130,6 +140,15 @@ export interface PluginApi {
|
|
|
130
140
|
useDataChannel?: UseDataChannelFunctionFromPluginApi;
|
|
131
141
|
mapOfDispatchers: MapOfDispatchers;
|
|
132
142
|
uiCommands?: UiCommands;
|
|
143
|
+
/**
|
|
144
|
+
* Returns an array with the DOM elements for the chat messages.
|
|
145
|
+
*
|
|
146
|
+
* @param messageIds - Ids of the chat messages one wants to retrieve in the form of an array
|
|
147
|
+
* @returns The array of an object with DOM elements (in this case, div) and the id
|
|
148
|
+
* of the chat message
|
|
149
|
+
*
|
|
150
|
+
*/
|
|
151
|
+
useChatMessageDomElements?: UseChatMessageDomElementsFunction;
|
|
133
152
|
getSessionToken?: GetSessionTokenFunction;
|
|
134
153
|
getJoinUrl?: GetJoinUrlFunction;
|
|
135
154
|
}
|
package/dist/cjs/core/enum.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { DataChannelHooks } from '
|
|
1
|
+
import { DataChannelHooks } from '../data-channel/enums';
|
|
2
|
+
import { DomElementManipulationHooks } from '../dom-element-manipulation/enums';
|
|
2
3
|
import { DataConsumptionHooks } from '../data-consumption/enums';
|
|
3
4
|
export declare enum HookEvents {
|
|
4
5
|
UPDATED = "HOOK_DATA_UPDATED",
|
|
5
6
|
SUBSCRIBED = "PLUGIN_SUBSCRIBED_TO_HOOK",
|
|
6
7
|
UNSUBSCRIBED = "PLUGIN_UNSUBSCRIBED_FROM_HOOK"
|
|
7
8
|
}
|
|
8
|
-
export type Hooks = DataConsumptionHooks | DataChannelHooks;
|
|
9
|
+
export type Hooks = DataConsumptionHooks | DataChannelHooks | DomElementManipulationHooks;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../../src/core/enum.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../../src/core/enum.ts"],"names":[],"mappings":";;;AAIA,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,2CAA6B,CAAA;IAC7B,sDAAwC,CAAA;IACxC,4DAA8C,CAAA;AAChD,CAAC,EAJW,UAAU,0BAAV,UAAU,QAIrB"}
|
package/dist/cjs/core/types.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { ApolloError } from '@apollo/client';
|
|
|
2
2
|
import { CustomSubscriptionArguments } from '../data-consumption/domain/shared/custom-subscription/types';
|
|
3
3
|
import { Hooks } from './enum';
|
|
4
4
|
import { DataChannelArguments } from '../data-channel/types';
|
|
5
|
+
import { DomElementManipulationArguments } from '../dom-element-manipulation/type';
|
|
5
6
|
/**
|
|
6
7
|
* Wrapper for the data that comes from the core. With this more complex object
|
|
7
8
|
* it is also possible to know whether the data is still loading, of even if something
|
|
@@ -14,7 +15,7 @@ export interface GraphqlResponseWrapper<TData> {
|
|
|
14
15
|
data?: TData;
|
|
15
16
|
error?: ApolloError;
|
|
16
17
|
}
|
|
17
|
-
export type HookArguments = CustomSubscriptionArguments | DataChannelArguments;
|
|
18
|
+
export type HookArguments = CustomSubscriptionArguments | DataChannelArguments | DomElementManipulationArguments;
|
|
18
19
|
export interface UpdatedEventDetails<T> {
|
|
19
20
|
hook: Hooks;
|
|
20
21
|
hookArguments?: HookArguments;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { UserVoice } from './talking-indicator/types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/data-consumption/domain/user-voice/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useTalkingIndicator = void 0;
|
|
4
|
+
var enums_1 = require("../../../../data-consumption/enums");
|
|
5
|
+
var hookCreator_1 = require("../../../factory/hookCreator");
|
|
6
|
+
var useTalkingIndicator = function () { return (0, hookCreator_1.createDataConsumptionHook)(enums_1.DataConsumptionHooks.TALKING_INDICATOR); };
|
|
7
|
+
exports.useTalkingIndicator = useTalkingIndicator;
|
|
8
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../../../../src/data-consumption/domain/user-voice/talking-indicator/hooks.ts"],"names":[],"mappings":";;;AAAA,4DAA0E;AAC1E,4DAAyE;AAGlE,IAAM,mBAAmB,GAAG,cAAM,OAAA,IAAA,uCAAyB,EAGhE,4BAAoB,CAAC,iBAAiB,CACvC,EAJwC,CAIxC,CAAC;AAJW,QAAA,mBAAmB,uBAI9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/data-consumption/domain/user-voice/talking-indicator/types.ts"],"names":[],"mappings":""}
|
|
@@ -3,5 +3,6 @@ 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
|
+
TALKING_INDICATOR = "Hooks::UseTalkingIndicator",
|
|
6
7
|
CUSTOM_SUBSCRIPTION = "Hooks::CustomSubscription"
|
|
7
8
|
}
|
|
@@ -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["TALKING_INDICATOR"] = "Hooks::UseTalkingIndicator";
|
|
10
11
|
DataConsumptionHooks["CUSTOM_SUBSCRIPTION"] = "Hooks::CustomSubscription";
|
|
11
12
|
})(DataConsumptionHooks || (exports.DataConsumptionHooks = DataConsumptionHooks = {}));
|
|
12
13
|
//# sourceMappingURL=enums.js.map
|
|
@@ -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,oBAOX;AAPD,WAAY,oBAAoB;IAC9B,8EAAsD,CAAA;IACtD,qEAA6C,CAAA;IAC7C,8DAAsC,CAAA;IACtC,6EAAqD,CAAA;IACrD,wEAAgD,CAAA;IAChD,yEAAiD,CAAA;AACnD,CAAC,EAPW,oBAAoB,oCAApB,oBAAoB,QAO/B"}
|
|
@@ -17,5 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./domain/presentations"), exports);
|
|
18
18
|
__exportStar(require("./domain/chat"), exports);
|
|
19
19
|
__exportStar(require("./domain/users"), exports);
|
|
20
|
+
__exportStar(require("./domain/user-voice"), exports);
|
|
20
21
|
__exportStar(require("./domain/shared"), exports);
|
|
21
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -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,kDAAgC"}
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useChatMessageDomElements: (messageIds: string[]) => HTMLDivElement[] | undefined;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useChatMessageDomElements = void 0;
|
|
4
|
+
var react_1 = require("react");
|
|
5
|
+
var enums_1 = require("../../enums");
|
|
6
|
+
var enum_1 = require("../../../core/enum");
|
|
7
|
+
var utils_1 = require("../../../data-consumption/utils");
|
|
8
|
+
var useChatMessageDomElements = function (messageIds) {
|
|
9
|
+
var _a = (0, react_1.useState)(), domElement = _a[0], setDomElement = _a[1];
|
|
10
|
+
var _b = (0, react_1.useState)(messageIds), messageIdsState = _b[0], setMessageIdsState = _b[1];
|
|
11
|
+
var handleCustomSubscriptionUpdateEvent = (function (event) {
|
|
12
|
+
var detail = event.detail;
|
|
13
|
+
if (detail.hook === enums_1.DomElementManipulationHooks.CHAT_MESSAGE
|
|
14
|
+
&& (0, utils_1.sortedStringify)(detail.data.map(function (message) { return message.messageId; })) === (0, utils_1.sortedStringify)(messageIdsState)) {
|
|
15
|
+
setDomElement(detail.data.map(function (message) { return message.message; }));
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
(0, react_1.useEffect)(function () {
|
|
19
|
+
if (messageIdsState) {
|
|
20
|
+
window.addEventListener(enum_1.HookEvents.UPDATED, handleCustomSubscriptionUpdateEvent);
|
|
21
|
+
return function () {
|
|
22
|
+
window.removeEventListener(enum_1.HookEvents.UPDATED, handleCustomSubscriptionUpdateEvent);
|
|
23
|
+
window.dispatchEvent(new CustomEvent(enum_1.HookEvents.UNSUBSCRIBED, {
|
|
24
|
+
detail: {
|
|
25
|
+
hook: enums_1.DomElementManipulationHooks.CHAT_MESSAGE,
|
|
26
|
+
hookArguments: {
|
|
27
|
+
messageIds: messageIds,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
}));
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
return function () { };
|
|
34
|
+
}, []);
|
|
35
|
+
(0, react_1.useEffect)(function () {
|
|
36
|
+
if (messageIdsState) {
|
|
37
|
+
window.removeEventListener(enum_1.HookEvents.UPDATED, handleCustomSubscriptionUpdateEvent);
|
|
38
|
+
window.addEventListener(enum_1.HookEvents.UPDATED, handleCustomSubscriptionUpdateEvent);
|
|
39
|
+
window.dispatchEvent(new CustomEvent(enum_1.HookEvents.SUBSCRIBED, {
|
|
40
|
+
detail: {
|
|
41
|
+
hook: enums_1.DomElementManipulationHooks.CHAT_MESSAGE,
|
|
42
|
+
hookArguments: {
|
|
43
|
+
messageIds: messageIds,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
}, [messageIdsState]);
|
|
49
|
+
if ((0, utils_1.sortedStringify)(messageIds) !== (0, utils_1.sortedStringify)(messageIdsState)) {
|
|
50
|
+
setMessageIdsState(messageIds);
|
|
51
|
+
}
|
|
52
|
+
return domElement;
|
|
53
|
+
};
|
|
54
|
+
exports.useChatMessageDomElements = useChatMessageDomElements;
|
|
55
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../../../src/dom-element-manipulation/chat/message/hooks.ts"],"names":[],"mappings":";;;AAAA,+BAA4C;AAC5C,qCAA0D;AAC1D,2CAAgD;AAKhD,yDAAkE;AAE3D,IAAM,yBAAyB,GAAG,UAAC,UAAoB;IACtD,IAAA,KAA8B,IAAA,gBAAQ,GAAoB,EAAzD,UAAU,QAAA,EAAE,aAAa,QAAgC,CAAC;IAC3D,IAAA,KAAwC,IAAA,gBAAQ,EAAW,UAAU,CAAC,EAArE,eAAe,QAAA,EAAE,kBAAkB,QAAkC,CAAC;IAE7E,IAAM,mCAAmC,GAAkB,CACzD,UAAC,KACqE;QACpE,IAAM,MAAM,GAAG,KAAK,CAAC,MAC4B,CAAC;QAClD,IAAI,MAAM,CAAC,IAAI,KAAK,mCAA2B,CAAC,YAAY;eACvD,IAAA,uBAAe,EAChB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,UAAC,OAAO,IAAK,OAAA,OAAO,CAAC,SAAS,EAAjB,CAAiB,CAAC,CAChD,KAAK,IAAA,uBAAe,EAAC,eAAe,CAAC,EAAE;YACxC,aAAa,CAAC,MAAM,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AAC;KAChC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AApDW,QAAA,yBAAyB,6BAoDpC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type UseChatMessageDomElementsFunction = (messageIds: string[]) => HTMLDivElement[] | undefined;
|
|
2
|
+
export interface ChatMessageDomElementsArguments {
|
|
3
|
+
messageIds: string[];
|
|
4
|
+
}
|
|
5
|
+
export interface UpdatedEventDetailsForChatMessageDomElements {
|
|
6
|
+
messageId: string;
|
|
7
|
+
message: HTMLDivElement;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/dom-element-manipulation/chat/message/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DomElementManipulationHooks = void 0;
|
|
4
|
+
var DomElementManipulationHooks;
|
|
5
|
+
(function (DomElementManipulationHooks) {
|
|
6
|
+
DomElementManipulationHooks["CHAT_MESSAGE"] = "CHAT_MESSAGE";
|
|
7
|
+
})(DomElementManipulationHooks || (exports.DomElementManipulationHooks = DomElementManipulationHooks = {}));
|
|
8
|
+
//# sourceMappingURL=enums.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../../src/dom-element-manipulation/enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,2BAEX;AAFD,WAAY,2BAA2B;IACrC,4DAA6B,CAAA;AAC/B,CAAC,EAFW,2BAA2B,2CAA3B,2BAA2B,QAEtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../../src/dom-element-manipulation/type.ts"],"names":[],"mappings":""}
|
|
@@ -5,4 +5,9 @@ export declare const uiCommands: {
|
|
|
5
5
|
fill: (fillChatFormCommandArguments: import("./chat/form/types").FillChatFormCommandArguments) => void;
|
|
6
6
|
};
|
|
7
7
|
};
|
|
8
|
+
externalVideo: {
|
|
9
|
+
volume: {
|
|
10
|
+
set: (setExternalVideoVolumeCommandArguments: import("./external-video/volume/types").SetExternalVideoVolumeCommandArguments) => void;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
8
13
|
};
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.uiCommands = void 0;
|
|
4
4
|
var commands_1 = require("./chat/commands");
|
|
5
|
+
var commands_2 = require("./external-video/commands");
|
|
5
6
|
exports.uiCommands = {
|
|
6
7
|
chat: commands_1.chat,
|
|
8
|
+
externalVideo: commands_2.externalVideo
|
|
7
9
|
};
|
|
8
10
|
//# sourceMappingURL=commands.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../src/ui-commands/commands.ts"],"names":[],"mappings":";;;AAAA,4CAAuC;
|
|
1
|
+
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../src/ui-commands/commands.ts"],"names":[],"mappings":";;;AAAA,4CAAuC;AACvC,sDAA0D;AAE7C,QAAA,UAAU,GAAG;IACxB,IAAI,iBAAA;IACJ,aAAa,0BAAA;CACd,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../../src/ui-commands/external-video/commands.ts"],"names":[],"mappings":";;;AAAA,8CAA2C;AAE9B,QAAA,aAAa,GAAG;IACzB,MAAM,mBAAA;CACT,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/ui-commands/external-video/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SetExternalVideoVolumeCommandArguments } from './types';
|
|
2
|
+
export declare const volume: {
|
|
3
|
+
/**
|
|
4
|
+
* Sets the volume of the external video to a certain level. Needs to be a value between 0 and 1.
|
|
5
|
+
*
|
|
6
|
+
* @param setExternalVideoVolumeCommandArguments the volume to which the core will set in the external video.
|
|
7
|
+
* Refer to {@link SetExternalVideoVolumeCommandArguments} to understand the argument structure.
|
|
8
|
+
*/
|
|
9
|
+
set: (setExternalVideoVolumeCommandArguments: SetExternalVideoVolumeCommandArguments) => void;
|
|
10
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.volume = void 0;
|
|
4
|
+
var enums_1 = require("./enums");
|
|
5
|
+
exports.volume = {
|
|
6
|
+
/**
|
|
7
|
+
* Sets the volume of the external video to a certain level. Needs to be a value between 0 and 1.
|
|
8
|
+
*
|
|
9
|
+
* @param setExternalVideoVolumeCommandArguments the volume to which the core will set in the external video.
|
|
10
|
+
* Refer to {@link SetExternalVideoVolumeCommandArguments} to understand the argument structure.
|
|
11
|
+
*/
|
|
12
|
+
set: function (setExternalVideoVolumeCommandArguments) {
|
|
13
|
+
var volumeToBeSet = setExternalVideoVolumeCommandArguments.volume;
|
|
14
|
+
if (volumeToBeSet <= 1 && volumeToBeSet >= 0) {
|
|
15
|
+
window.dispatchEvent(new CustomEvent(enums_1.ExternalVideoVolumeCommandsEnum.SET, {
|
|
16
|
+
detail: setExternalVideoVolumeCommandArguments,
|
|
17
|
+
}));
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
console.warn('Not possible to set a volume less than zero or higher than 1.');
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../../../src/ui-commands/external-video/volume/commands.ts"],"names":[],"mappings":";;;AAAA,iCAA0D;AAG7C,QAAA,MAAM,GAAG;IACpB;;;;;OAKG;IACH,GAAG,EAAE,UAAC,sCAA8E;QAClF,IAAM,aAAa,GAAG,sCAAsC,CAAC,MAAM,CAAC;QACpE,IAAI,aAAa,IAAI,CAAC,IAAI,aAAa,IAAI,CAAC,EAAE;YAC5C,MAAM,CAAC,aAAa,CAClB,IAAI,WAAW,CAEb,uCAA+B,CAAC,GAAG,EAAE;gBACrC,MAAM,EAAE,sCAAsC;aAC/C,CAAC,CACH,CAAC;SACH;aAAM;YACL,OAAO,CAAC,IAAI,CAAC,+DAA+D,CAAC,CAAC;SAC/E;IAEH,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExternalVideoVolumeCommandsEnum = void 0;
|
|
4
|
+
var ExternalVideoVolumeCommandsEnum;
|
|
5
|
+
(function (ExternalVideoVolumeCommandsEnum) {
|
|
6
|
+
ExternalVideoVolumeCommandsEnum["SET"] = "SET_EXTERNAL_VIDEO_VOLUME_COMMAND";
|
|
7
|
+
})(ExternalVideoVolumeCommandsEnum || (exports.ExternalVideoVolumeCommandsEnum = ExternalVideoVolumeCommandsEnum = {}));
|
|
8
|
+
//# sourceMappingURL=enums.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../../../../src/ui-commands/external-video/volume/enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,+BAEX;AAFD,WAAY,+BAA+B;IACzC,4EAAyC,CAAA;AAC3C,CAAC,EAFW,+BAA+B,+CAA/B,+BAA+B,QAE1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/ui-commands/external-video/volume/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { UiCommandsChatObject } from './chat/types';
|
|
2
|
+
import { UiCommandsExternalVideoObject } from './external-video/types';
|
|
2
3
|
export interface UiCommandsEventWrapper<T> extends Event {
|
|
3
4
|
detail: T;
|
|
4
5
|
}
|
|
5
6
|
export interface UiCommands {
|
|
6
7
|
chat: UiCommandsChatObject;
|
|
8
|
+
externalVideo: UiCommandsExternalVideoObject;
|
|
7
9
|
}
|