fcr-ui-scene-mobile 3.4.0
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/lib/assets/ground_glass_bg.png +0 -0
- package/lib/base.d.ts +11 -0
- package/lib/base.js +39 -0
- package/lib/common/device-store.d.ts +86 -0
- package/lib/common/device-store.js +642 -0
- package/lib/common/device-stream-store.d.ts +26 -0
- package/lib/common/device-stream-store.js +298 -0
- package/lib/common/event-store.d.ts +124 -0
- package/lib/common/event-store.js +249 -0
- package/lib/common/global-context.d.ts +11 -0
- package/lib/common/global-context.js +9 -0
- package/lib/common/member-list-data-source.d.ts +28 -0
- package/lib/common/member-list-data-source.js +305 -0
- package/lib/common/participant-store.d.ts +195 -0
- package/lib/common/participant-store.js +1577 -0
- package/lib/common/security-store.d.ts +119 -0
- package/lib/common/security-store.js +948 -0
- package/lib/common/setting-store.d.ts +181 -0
- package/lib/common/setting-store.js +797 -0
- package/lib/common/type.d.ts +73 -0
- package/lib/common/type.js +22 -0
- package/lib/config/default-config.d.ts +32 -0
- package/lib/config/default-config.js +39 -0
- package/lib/config/setting-config.d.ts +16 -0
- package/lib/config/setting-config.js +17 -0
- package/lib/creator.d.ts +10 -0
- package/lib/creator.js +49 -0
- package/lib/global.d.ts +8 -0
- package/lib/hooks/meeting-time.d.ts +15 -0
- package/lib/hooks/meeting-time.js +92 -0
- package/lib/hooks/useIsNodePresent.d.ts +4 -0
- package/lib/hooks/useIsNodePresent.js +53 -0
- package/lib/hooks/useOnRefMount.d.ts +2 -0
- package/lib/hooks/useOnRefMount.js +27 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +50 -0
- package/lib/mobile-global.css +28 -0
- package/lib/modules/action-bar/bottom-icons.d.ts +17 -0
- package/lib/modules/action-bar/bottom-icons.js +160 -0
- package/lib/modules/action-bar/context.d.ts +2 -0
- package/lib/modules/action-bar/context.js +9 -0
- package/lib/modules/action-bar/index.css +33 -0
- package/lib/modules/action-bar/index.d.ts +27 -0
- package/lib/modules/action-bar/index.js +46 -0
- package/lib/modules/action-bar/member-list-popup/attendee/index.css +130 -0
- package/lib/modules/action-bar/member-list-popup/attendee/index.d.ts +19 -0
- package/lib/modules/action-bar/member-list-popup/attendee/index.js +252 -0
- package/lib/modules/action-bar/member-list-popup/attendee/list.d.ts +1 -0
- package/lib/modules/action-bar/member-list-popup/attendee/list.js +82 -0
- package/lib/modules/action-bar/member-list-popup/index.css +35 -0
- package/lib/modules/action-bar/member-list-popup/index.d.ts +7 -0
- package/lib/modules/action-bar/member-list-popup/index.js +40 -0
- package/lib/modules/action-bar/member-list-popup/participant-more-actions/index.css +0 -0
- package/lib/modules/action-bar/member-list-popup/participant-more-actions/index.d.ts +12 -0
- package/lib/modules/action-bar/member-list-popup/participant-more-actions/index.js +58 -0
- package/lib/modules/action-bar/more-popup/index.css +71 -0
- package/lib/modules/action-bar/more-popup/index.d.ts +2 -0
- package/lib/modules/action-bar/more-popup/index.js +126 -0
- package/lib/modules/action-bar/store.d.ts +196 -0
- package/lib/modules/action-bar/store.js +1425 -0
- package/lib/modules/action-bar/type.d.ts +6 -0
- package/lib/modules/action-bar/type.js +13 -0
- package/lib/modules/action-bar/view.d.ts +2 -0
- package/lib/modules/action-bar/view.js +75 -0
- package/lib/modules/audio-stream/ index.d.ts +19 -0
- package/lib/modules/audio-stream/ index.js +109 -0
- package/lib/modules/audio-stream/index.d.ts +25 -0
- package/lib/modules/audio-stream/index.js +135 -0
- package/lib/modules/chat/chat-bar/index.css +97 -0
- package/lib/modules/chat/chat-bar/index.d.ts +12 -0
- package/lib/modules/chat/chat-bar/index.js +129 -0
- package/lib/modules/chat/chat-notification/index.css +71 -0
- package/lib/modules/chat/chat-notification/index.d.ts +3 -0
- package/lib/modules/chat/chat-notification/index.js +75 -0
- package/lib/modules/chat/chat-select/index.css +183 -0
- package/lib/modules/chat/chat-select/index.d.ts +12 -0
- package/lib/modules/chat/chat-select/index.js +223 -0
- package/lib/modules/chat/contex.d.ts +2 -0
- package/lib/modules/chat/contex.js +9 -0
- package/lib/modules/chat/demo-wrapper.d.ts +1 -0
- package/lib/modules/chat/demo-wrapper.js +42 -0
- package/lib/modules/chat/index.css +108 -0
- package/lib/modules/chat/index.d.ts +28 -0
- package/lib/modules/chat/index.dev.d.ts +1 -0
- package/lib/modules/chat/index.dev.js +58 -0
- package/lib/modules/chat/index.js +208 -0
- package/lib/modules/chat/message-list.d.ts +22 -0
- package/lib/modules/chat/message-list.js +617 -0
- package/lib/modules/chat/mock.d.ts +2 -0
- package/lib/modules/chat/mock.js +283 -0
- package/lib/modules/chat/store.d.ts +183 -0
- package/lib/modules/chat/store.js +1101 -0
- package/lib/modules/chat/util.d.ts +6 -0
- package/lib/modules/chat/util.js +69 -0
- package/lib/modules/chat/view.d.ts +11 -0
- package/lib/modules/chat/view.js +414 -0
- package/lib/modules/layout/bottom-drawer/index.css +34 -0
- package/lib/modules/layout/bottom-drawer/index.d.ts +3 -0
- package/lib/modules/layout/bottom-drawer/index.js +129 -0
- package/lib/modules/layout/components/Layout.d.ts +1 -0
- package/lib/modules/layout/components/Layout.js +98 -0
- package/lib/modules/layout/components/equip-request-popup/index.css +30 -0
- package/lib/modules/layout/components/equip-request-popup/index.d.ts +3 -0
- package/lib/modules/layout/components/equip-request-popup/index.js +78 -0
- package/lib/modules/layout/components/index.css +78 -0
- package/lib/modules/layout/components/index.d.ts +2 -0
- package/lib/modules/layout/components/index.js +25 -0
- package/lib/modules/layout/context.d.ts +2 -0
- package/lib/modules/layout/context.js +9 -0
- package/lib/modules/layout/drawer-header/index.css +27 -0
- package/lib/modules/layout/drawer-header/index.d.ts +10 -0
- package/lib/modules/layout/drawer-header/index.js +54 -0
- package/lib/modules/layout/index.css +22 -0
- package/lib/modules/layout/index.d.ts +8 -0
- package/lib/modules/layout/index.js +47 -0
- package/lib/modules/layout/store.d.ts +59 -0
- package/lib/modules/layout/store.js +379 -0
- package/lib/modules/layout/type.d.ts +65 -0
- package/lib/modules/layout/type.js +52 -0
- package/lib/modules/layout/view.d.ts +2 -0
- package/lib/modules/layout/view.js +10 -0
- package/lib/modules/member-layout/context.d.ts +2 -0
- package/lib/modules/member-layout/context.js +9 -0
- package/lib/modules/member-layout/data.d.ts +2 -0
- package/lib/modules/member-layout/data.js +304 -0
- package/lib/modules/member-layout/grid/index.css +98 -0
- package/lib/modules/member-layout/grid/index.d.ts +21 -0
- package/lib/modules/member-layout/grid/index.js +316 -0
- package/lib/modules/member-layout/index.css +88 -0
- package/lib/modules/member-layout/index.d.ts +8 -0
- package/lib/modules/member-layout/index.js +45 -0
- package/lib/modules/member-layout/share-toast/index.css +30 -0
- package/lib/modules/member-layout/share-toast/index.d.ts +5 -0
- package/lib/modules/member-layout/share-toast/index.js +43 -0
- package/lib/modules/member-layout/speaker/index.css +30 -0
- package/lib/modules/member-layout/speaker/index.d.ts +9 -0
- package/lib/modules/member-layout/speaker/index.js +28 -0
- package/lib/modules/member-layout/store.d.ts +70 -0
- package/lib/modules/member-layout/store.js +479 -0
- package/lib/modules/member-layout/user/index.css +121 -0
- package/lib/modules/member-layout/user/index.d.ts +34 -0
- package/lib/modules/member-layout/user/index.js +355 -0
- package/lib/modules/member-layout/user/types.d.ts +16 -0
- package/lib/modules/member-layout/user/types.js +6 -0
- package/lib/modules/member-layout/view.d.ts +2 -0
- package/lib/modules/member-layout/view.js +225 -0
- package/lib/modules/state-bar/context.d.ts +2 -0
- package/lib/modules/state-bar/context.js +9 -0
- package/lib/modules/state-bar/index.css +79 -0
- package/lib/modules/state-bar/index.d.ts +17 -0
- package/lib/modules/state-bar/index.js +55 -0
- package/lib/modules/state-bar/leaving-room/index.css +14 -0
- package/lib/modules/state-bar/leaving-room/index.d.ts +7 -0
- package/lib/modules/state-bar/leaving-room/index.js +38 -0
- package/lib/modules/state-bar/meeting-detail/index.css +72 -0
- package/lib/modules/state-bar/meeting-detail/index.d.ts +2 -0
- package/lib/modules/state-bar/meeting-detail/index.js +59 -0
- package/lib/modules/state-bar/meeting-detail/meeting-info/copy.d.ts +4 -0
- package/lib/modules/state-bar/meeting-detail/meeting-info/copy.js +81 -0
- package/lib/modules/state-bar/meeting-detail/meeting-info/index.css +92 -0
- package/lib/modules/state-bar/meeting-detail/meeting-info/index.d.ts +2 -0
- package/lib/modules/state-bar/meeting-detail/meeting-info/index.js +188 -0
- package/lib/modules/state-bar/meeting-detail/net-quality/index.css +27 -0
- package/lib/modules/state-bar/meeting-detail/net-quality/index.d.ts +2 -0
- package/lib/modules/state-bar/meeting-detail/net-quality/index.js +87 -0
- package/lib/modules/state-bar/store.d.ts +76 -0
- package/lib/modules/state-bar/store.js +561 -0
- package/lib/modules/state-bar/view.d.ts +7 -0
- package/lib/modules/state-bar/view.js +215 -0
- package/lib/modules/whiteboard/app.d.ts +2 -0
- package/lib/modules/whiteboard/app.js +41 -0
- package/lib/modules/whiteboard/components/control-bar/index.css +53 -0
- package/lib/modules/whiteboard/components/control-bar/index.d.ts +2 -0
- package/lib/modules/whiteboard/components/control-bar/index.js +156 -0
- package/lib/modules/whiteboard/components/control-bar/store.d.ts +35 -0
- package/lib/modules/whiteboard/components/control-bar/store.js +288 -0
- package/lib/modules/whiteboard/components/loading/index.css +76 -0
- package/lib/modules/whiteboard/components/loading/index.d.ts +2 -0
- package/lib/modules/whiteboard/components/loading/index.js +68 -0
- package/lib/modules/whiteboard/components/loading/loading.png +0 -0
- package/lib/modules/whiteboard/components/multi-window/index.css +65 -0
- package/lib/modules/whiteboard/components/multi-window/index.d.ts +5 -0
- package/lib/modules/whiteboard/components/multi-window/index.js +39 -0
- package/lib/modules/whiteboard/components/pagination/index.css +228 -0
- package/lib/modules/whiteboard/components/pagination/index.d.ts +15 -0
- package/lib/modules/whiteboard/components/pagination/index.js +163 -0
- package/lib/modules/whiteboard/components/pagination/store.d.ts +18 -0
- package/lib/modules/whiteboard/components/pagination/store.js +17 -0
- package/lib/modules/whiteboard/components/progress/index.d.ts +5 -0
- package/lib/modules/whiteboard/components/progress/index.js +43 -0
- package/lib/modules/whiteboard/components/progress/style.css +52 -0
- package/lib/modules/whiteboard/components/scene-pagination.d.ts +1 -0
- package/lib/modules/whiteboard/components/scene-pagination.js +30 -0
- package/lib/modules/whiteboard/components/switch-theme/index.css +98 -0
- package/lib/modules/whiteboard/components/switch-theme/index.d.ts +3 -0
- package/lib/modules/whiteboard/components/switch-theme/index.js +89 -0
- package/lib/modules/whiteboard/components/switch-theme/item.d.ts +9 -0
- package/lib/modules/whiteboard/components/switch-theme/item.js +53 -0
- package/lib/modules/whiteboard/components/switch-theme/libs.d.ts +4 -0
- package/lib/modules/whiteboard/components/switch-theme/libs.js +29 -0
- package/lib/modules/whiteboard/components/toolbar/ style.css +588 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/color.d.ts +5 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/color.js +38 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/panel.d.ts +1 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/panel.js +107 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/picker.d.ts +1 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/picker.js +59 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/index.d.ts +2 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/index.js +44 -0
- package/lib/modules/whiteboard/components/toolbar/components/eraser-picker.d.ts +4 -0
- package/lib/modules/whiteboard/components/toolbar/components/eraser-picker.js +89 -0
- package/lib/modules/whiteboard/components/toolbar/components/extra-tool-picker.d.ts +1 -0
- package/lib/modules/whiteboard/components/toolbar/components/extra-tool-picker.js +63 -0
- package/lib/modules/whiteboard/components/toolbar/components/history.d.ts +2 -0
- package/lib/modules/whiteboard/components/toolbar/components/history.js +46 -0
- package/lib/modules/whiteboard/components/toolbar/components/icons/fold-icon.d.ts +2 -0
- package/lib/modules/whiteboard/components/toolbar/components/icons/fold-icon.js +39 -0
- package/lib/modules/whiteboard/components/toolbar/components/icons/move-icon.d.ts +1 -0
- package/lib/modules/whiteboard/components/toolbar/components/icons/move-icon.js +66 -0
- package/lib/modules/whiteboard/components/toolbar/components/move-handle.d.ts +5 -0
- package/lib/modules/whiteboard/components/toolbar/components/move-handle.js +134 -0
- package/lib/modules/whiteboard/components/toolbar/components/pen-picker.d.ts +4 -0
- package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +106 -0
- package/lib/modules/whiteboard/components/toolbar/components/shape-picker.d.ts +4 -0
- package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +168 -0
- package/lib/modules/whiteboard/components/toolbar/hooks/index.d.ts +14 -0
- package/lib/modules/whiteboard/components/toolbar/hooks/index.js +211 -0
- package/lib/modules/whiteboard/components/toolbar/index.d.ts +2 -0
- package/lib/modules/whiteboard/components/toolbar/index.js +183 -0
- package/lib/modules/whiteboard/components/toolbar/store.d.ts +51 -0
- package/lib/modules/whiteboard/components/toolbar/store.js +248 -0
- package/lib/modules/whiteboard/context.d.ts +69 -0
- package/lib/modules/whiteboard/context.js +36 -0
- package/lib/modules/whiteboard/index.d.ts +119 -0
- package/lib/modules/whiteboard/index.js +1134 -0
- package/lib/modules/whiteboard/style.css +143 -0
- package/lib/modules/whiteboard/type.d.ts +94 -0
- package/lib/modules/whiteboard/type.js +89 -0
- package/lib/modules/whiteboard/utils.d.ts +12 -0
- package/lib/modules/whiteboard/utils.js +36 -0
- package/lib/plugins/css-preset-plugin.d.ts +1 -0
- package/lib/plugins/css-preset-plugin.js +29 -0
- package/lib/plugins/module-dev-plugin.d.ts +12 -0
- package/lib/plugins/module-dev-plugin.js +183 -0
- package/lib/plugins/multi-lang-plugin.d.ts +1 -0
- package/lib/plugins/multi-lang-plugin.js +19 -0
- package/lib/plugins/rtm-plugin.d.ts +1 -0
- package/lib/plugins/rtm-plugin.js +5 -0
- package/lib/plugins/web-rtc-plugin.d.ts +1 -0
- package/lib/plugins/web-rtc-plugin.js +5 -0
- package/lib/translations/enUS.d.ts +1855 -0
- package/lib/translations/enUS.js +1895 -0
- package/lib/translations/zhCN.d.ts +1852 -0
- package/lib/translations/zhCN.js +1892 -0
- package/lib/type.d.ts +121 -0
- package/lib/type.js +46 -0
- package/lib/ui-manager.d.ts +32 -0
- package/lib/ui-manager.js +426 -0
- package/lib/ui-scene.d.ts +14 -0
- package/lib/ui-scene.js +141 -0
- package/lib/utilities/board-context.d.ts +4 -0
- package/lib/utilities/board-context.js +12 -0
- package/lib/utilities/constant.d.ts +286 -0
- package/lib/utilities/constant.js +271 -0
- package/lib/utilities/copyText.d.ts +2 -0
- package/lib/utilities/copyText.js +43 -0
- package/lib/utilities/extract.d.ts +5 -0
- package/lib/utilities/extract.js +117 -0
- package/lib/utilities/hooks.d.ts +14 -0
- package/lib/utilities/hooks.js +101 -0
- package/lib/utilities/mute-action.d.ts +4 -0
- package/lib/utilities/mute-action.js +48 -0
- package/lib/utilities/parameters.d.ts +7 -0
- package/lib/utilities/parameters.js +20 -0
- package/lib/utilities/regex.d.ts +1 -0
- package/lib/utilities/regex.js +14 -0
- package/lib/utilities/tools.d.ts +27 -0
- package/lib/utilities/tools.js +169 -0
- package/lib/utilities/useNamespace.d.ts +15 -0
- package/lib/utilities/useNamespace.js +66 -0
- package/package.json +63 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.FcrMobileGlobalContext = void 0;
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var FcrMobileGlobalContext = exports.FcrMobileGlobalContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FcrUIMemberData, FcrUIMemberListDataSource, FcrUIMemberSortingPriority } from './type';
|
|
2
|
+
import { FcrUserInfo, FcrStreamInfo } from 'fcr-core/lib/type';
|
|
3
|
+
export declare class FcrUIMemberDataImpl implements FcrUIMemberData {
|
|
4
|
+
private _isMySelf;
|
|
5
|
+
userInfo: FcrUserInfo;
|
|
6
|
+
setUserInfo(userInfo: FcrUserInfo & {
|
|
7
|
+
isBoardActive?: boolean;
|
|
8
|
+
}): void;
|
|
9
|
+
streams: FcrStreamInfo[];
|
|
10
|
+
updateStream(stream: FcrStreamInfo): void;
|
|
11
|
+
addStream(stream: FcrStreamInfo): void;
|
|
12
|
+
removeStream(streamId: string): void;
|
|
13
|
+
constructor(userInfo: FcrUserInfo, streams: Readonly<FcrStreamInfo[]>, _isMySelf: boolean);
|
|
14
|
+
get userId(): string;
|
|
15
|
+
get sortingPriority(): FcrUIMemberSortingPriority;
|
|
16
|
+
}
|
|
17
|
+
export declare class FcrUIMemberListDataSourceImpl implements FcrUIMemberListDataSource {
|
|
18
|
+
accessor list: FcrUIMemberDataImpl[];
|
|
19
|
+
resetList(): boolean;
|
|
20
|
+
add(user: FcrUserInfo, streams: Readonly<FcrStreamInfo[]>, isMySelf: boolean): boolean;
|
|
21
|
+
update(param: FcrStreamInfo | FcrUserInfo | undefined, isBoardActive?: boolean): boolean;
|
|
22
|
+
updateWithStreamAdd(stream: FcrStreamInfo): boolean;
|
|
23
|
+
updateWithStreamRemove(stream: FcrStreamInfo): boolean;
|
|
24
|
+
delete(user: FcrUserInfo): boolean;
|
|
25
|
+
private _insertEndByPriority;
|
|
26
|
+
private _findInsertEndIndex;
|
|
27
|
+
private _findMemberDataByStream;
|
|
28
|
+
}
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.symbol.js");
|
|
4
|
+
require("core-js/modules/es.symbol.description.js");
|
|
5
|
+
require("core-js/modules/es.symbol.to-primitive.js");
|
|
6
|
+
require("core-js/modules/es.error.cause.js");
|
|
7
|
+
require("core-js/modules/es.error.to-string.js");
|
|
8
|
+
require("core-js/modules/es.array.filter.js");
|
|
9
|
+
require("core-js/modules/es.array.for-each.js");
|
|
10
|
+
require("core-js/modules/es.array.is-array.js");
|
|
11
|
+
require("core-js/modules/es.date.to-primitive.js");
|
|
12
|
+
require("core-js/modules/es.function.bind.js");
|
|
13
|
+
require("core-js/modules/es.function.name.js");
|
|
14
|
+
require("core-js/modules/es.map.js");
|
|
15
|
+
require("core-js/modules/es.number.constructor.js");
|
|
16
|
+
require("core-js/modules/es.object.create.js");
|
|
17
|
+
require("core-js/modules/es.object.define-properties.js");
|
|
18
|
+
require("core-js/modules/es.object.define-property.js");
|
|
19
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
20
|
+
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
21
|
+
require("core-js/modules/es.object.keys.js");
|
|
22
|
+
require("core-js/modules/esnext.async-iterator.filter.js");
|
|
23
|
+
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
24
|
+
require("core-js/modules/esnext.function.metadata.js");
|
|
25
|
+
require("core-js/modules/esnext.iterator.filter.js");
|
|
26
|
+
require("core-js/modules/esnext.iterator.for-each.js");
|
|
27
|
+
require("core-js/modules/esnext.map.delete-all.js");
|
|
28
|
+
require("core-js/modules/esnext.map.emplace.js");
|
|
29
|
+
require("core-js/modules/esnext.map.every.js");
|
|
30
|
+
require("core-js/modules/esnext.map.filter.js");
|
|
31
|
+
require("core-js/modules/esnext.map.find.js");
|
|
32
|
+
require("core-js/modules/esnext.map.find-key.js");
|
|
33
|
+
require("core-js/modules/esnext.map.includes.js");
|
|
34
|
+
require("core-js/modules/esnext.map.key-of.js");
|
|
35
|
+
require("core-js/modules/esnext.map.map-keys.js");
|
|
36
|
+
require("core-js/modules/esnext.map.map-values.js");
|
|
37
|
+
require("core-js/modules/esnext.map.merge.js");
|
|
38
|
+
require("core-js/modules/esnext.map.reduce.js");
|
|
39
|
+
require("core-js/modules/esnext.map.some.js");
|
|
40
|
+
require("core-js/modules/esnext.map.update.js");
|
|
41
|
+
require("core-js/modules/esnext.symbol.metadata.js");
|
|
42
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
43
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
44
|
+
var _typeof3 = require("@babel/runtime/helpers/typeof");
|
|
45
|
+
Object.defineProperty(exports, "__esModule", {
|
|
46
|
+
value: true
|
|
47
|
+
});
|
|
48
|
+
exports.FcrUIMemberListDataSourceImpl = exports.FcrUIMemberDataImpl = void 0;
|
|
49
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
50
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
51
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
52
|
+
require("core-js/modules/es.array.find.js");
|
|
53
|
+
require("core-js/modules/es.array.find-index.js");
|
|
54
|
+
require("core-js/modules/es.array.find-last-index.js");
|
|
55
|
+
require("core-js/modules/es.array.iterator.js");
|
|
56
|
+
require("core-js/modules/es.array.push.js");
|
|
57
|
+
require("core-js/modules/es.array.splice.js");
|
|
58
|
+
require("core-js/modules/es.object.to-string.js");
|
|
59
|
+
require("core-js/modules/es.string.iterator.js");
|
|
60
|
+
require("core-js/modules/es.weak-map.js");
|
|
61
|
+
require("core-js/modules/esnext.async-iterator.find.js");
|
|
62
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
63
|
+
require("core-js/modules/esnext.iterator.find.js");
|
|
64
|
+
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
65
|
+
require("core-js/modules/esnext.weak-map.emplace.js");
|
|
66
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
67
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
68
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
69
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
70
|
+
var _mobx = require("mobx");
|
|
71
|
+
var _type = require("./type");
|
|
72
|
+
var _type2 = require("fcr-core/lib/type");
|
|
73
|
+
var _type3 = require("agora-rte-sdk/lib/core/rtc/type");
|
|
74
|
+
var _type4 = require("agora-rte-sdk/lib/core/scene/type");
|
|
75
|
+
var _FcrUIMemberListDataSourceImpl;
|
|
76
|
+
var _initProto, _init_list, _resetListDecs, _addDecs, _deleteDecs, _insertEndByPriorityDecs, _ref;
|
|
77
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
78
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
79
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
80
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
81
|
+
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
82
|
+
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
83
|
+
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
84
|
+
function _applyDecs(e, t, r, n, o, a) { function i(e, t, r) { return function (n, o) { return r && r(n), e[t].call(n, o); }; } function c(e, t) { for (var r = 0; r < e.length; r++) e[r].call(t); return t; } function s(e, t, r, n) { if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); return e; } function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { function m(e) { if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); } var y, v = t[0], g = t[3], b = !u; if (!b) { r || Array.isArray(v) || (v = [v]); var w = {}, S = [], A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; f ? (p || d ? w = { get: _setFunctionName(function () { return g(this); }, n, "get"), set: function set(e) { t[4](this, e); } } : w[A] = g, p || _setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); } for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { var D = v[j], E = r ? v[j - 1] : void 0, I = {}, O = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: n, metadata: a, addInitializer: function (e, t) { if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); s(t, "An initializer", "be", !0), c.push(t); }.bind(null, I) }; try { if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { var k, F; O["static"] = l, O["private"] = f, f ? 2 === o ? k = function k(e) { return m(e), w.value; } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function k(e) { return e[n]; }, (o < 2 || 4 === o) && (F = function F(e, t) { e[n] = t; })); var N = O.access = { has: f ? h.bind() : function (e) { return n in e; } }; if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { get: w.get, set: w.set } : w[A], O), d) { if ("object" == _typeof3(P) && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); } } finally { I.v = !0; } } return (p || d) && u.push(function (e, t) { for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); return t; }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; } function u(e, t) { return Object.defineProperty(e, Symbol.metadata || Symbol["for"]("Symbol.metadata"), { configurable: !0, enumerable: !0, value: t }); } if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol["for"]("Symbol.metadata")]; var f = Object.create(null == l ? null : l), p = function (e, t, r, n) { var o, a, i = [], s = function s(t) { return _checkInRHS(t) === e; }, u = new Map(); function l(e) { e && i.push(c.bind(null, e)); } for (var f = 0; f < t.length; f++) { var p = t[f]; if (Array.isArray(p)) { var d = p[1], h = p[2], m = p.length > 3, y = 16 & d, v = !!(8 & d), g = 0 == (d &= 7), b = h + "/" + v; if (!g && !m) { var w = u.get(b); if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); u.set(b, !(d > 2) || d); } applyDec(v ? e : e.prototype, p, y, m ? "#" + h : _toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); } } return l(o), l(a), i; }(e, t, o, f); return r.length || u(e, f), { e: p, get c() { var t = []; return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; } }; }
|
|
85
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof3(i) ? i : i + ""; }
|
|
86
|
+
function _toPrimitive(t, r) { if ("object" != _typeof3(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof3(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
87
|
+
function _setFunctionName(e, t, n) { "symbol" == _typeof3(t) && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; }
|
|
88
|
+
function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? _typeof3(e) : "null")); return e; }
|
|
89
|
+
var listLimitedCount = 255;
|
|
90
|
+
var FcrUIMemberDataImpl = exports.FcrUIMemberDataImpl = /*#__PURE__*/function () {
|
|
91
|
+
function FcrUIMemberDataImpl(userInfo, streams, _isMySelf) {
|
|
92
|
+
(0, _classCallCheck2["default"])(this, FcrUIMemberDataImpl);
|
|
93
|
+
this._isMySelf = _isMySelf;
|
|
94
|
+
this.userInfo = userInfo;
|
|
95
|
+
this.streams = (0, _toConsumableArray2["default"])(streams);
|
|
96
|
+
}
|
|
97
|
+
return (0, _createClass2["default"])(FcrUIMemberDataImpl, [{
|
|
98
|
+
key: "setUserInfo",
|
|
99
|
+
value: function setUserInfo(userInfo) {
|
|
100
|
+
this.userInfo = userInfo;
|
|
101
|
+
}
|
|
102
|
+
}, {
|
|
103
|
+
key: "updateStream",
|
|
104
|
+
value: function updateStream(stream) {
|
|
105
|
+
var index = this.streams.findIndex(function (s) {
|
|
106
|
+
return s.streamId === stream.streamId;
|
|
107
|
+
});
|
|
108
|
+
if (index !== -1) {
|
|
109
|
+
this.streams[index] = stream;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}, {
|
|
113
|
+
key: "addStream",
|
|
114
|
+
value: function addStream(stream) {
|
|
115
|
+
this.streams.push(stream);
|
|
116
|
+
}
|
|
117
|
+
}, {
|
|
118
|
+
key: "removeStream",
|
|
119
|
+
value: function removeStream(streamId) {
|
|
120
|
+
var index = this.streams.findIndex(function (s) {
|
|
121
|
+
return s.streamId === streamId;
|
|
122
|
+
});
|
|
123
|
+
if (index !== -1) {
|
|
124
|
+
this.streams.splice(index, 1);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}, {
|
|
128
|
+
key: "userId",
|
|
129
|
+
get: function get() {
|
|
130
|
+
return this.userInfo.userId;
|
|
131
|
+
}
|
|
132
|
+
}, {
|
|
133
|
+
key: "sortingPriority",
|
|
134
|
+
get: function get() {
|
|
135
|
+
if (this._isMySelf) {
|
|
136
|
+
return _type.FcrUIMemberSortingPriority.MYSELF;
|
|
137
|
+
}
|
|
138
|
+
if (this.userInfo.userRole === _type2.FcrUserRole.HOST) {
|
|
139
|
+
return _type.FcrUIMemberSortingPriority.HOST;
|
|
140
|
+
}
|
|
141
|
+
if (this.userInfo.userRole === _type2.FcrUserRole.COHOST) {
|
|
142
|
+
return _type.FcrUIMemberSortingPriority.CO_HOST;
|
|
143
|
+
}
|
|
144
|
+
var cameraStream = this.streams.find(function (s) {
|
|
145
|
+
return s.videoSourceType === _type3.AgoraRtcVideoSourceType.CAMERA;
|
|
146
|
+
});
|
|
147
|
+
var cameraOpen = (cameraStream === null || cameraStream === void 0 ? void 0 : cameraStream.videoSourceState) === _type3.AgoraRtcMediaSourceState.OPEN && ((cameraStream === null || cameraStream === void 0 ? void 0 : cameraStream.streamType) === _type4.AgoraRteMediaStreamType.VIDEO || (cameraStream === null || cameraStream === void 0 ? void 0 : cameraStream.streamType) === _type4.AgoraRteMediaStreamType.BOTH);
|
|
148
|
+
var microphoneOpen = (cameraStream === null || cameraStream === void 0 ? void 0 : cameraStream.audioSourceState) === _type3.AgoraRtcMediaSourceState.OPEN && ((cameraStream === null || cameraStream === void 0 ? void 0 : cameraStream.streamType) === _type4.AgoraRteMediaStreamType.AUDIO || (cameraStream === null || cameraStream === void 0 ? void 0 : cameraStream.streamType) === _type4.AgoraRteMediaStreamType.BOTH);
|
|
149
|
+
if (cameraOpen && microphoneOpen) {
|
|
150
|
+
return _type.FcrUIMemberSortingPriority.BOTH_OPEN;
|
|
151
|
+
}
|
|
152
|
+
if (cameraOpen) {
|
|
153
|
+
return _type.FcrUIMemberSortingPriority.CAMERA_OPEN;
|
|
154
|
+
}
|
|
155
|
+
if (microphoneOpen) {
|
|
156
|
+
return _type.FcrUIMemberSortingPriority.MICROPHONE_OPEN;
|
|
157
|
+
}
|
|
158
|
+
return _type.FcrUIMemberSortingPriority.NONE;
|
|
159
|
+
}
|
|
160
|
+
}]);
|
|
161
|
+
}();
|
|
162
|
+
var _A = /*#__PURE__*/new WeakMap();
|
|
163
|
+
_ref = (_resetListDecs = [_mobx.action, _mobx.action.bound], _addDecs = [_mobx.action, _mobx.action.bound], _deleteDecs = [_mobx.action, _mobx.action.bound], _insertEndByPriorityDecs = [_mobx.action, _mobx.action.bound], "list");
|
|
164
|
+
var FcrUIMemberListDataSourceImpl = exports.FcrUIMemberListDataSourceImpl = /*#__PURE__*/function () {
|
|
165
|
+
function FcrUIMemberListDataSourceImpl() {
|
|
166
|
+
(0, _classCallCheck2["default"])(this, FcrUIMemberListDataSourceImpl);
|
|
167
|
+
_classPrivateFieldInitSpec(this, _A, (_initProto(this), _init_list(this, [])));
|
|
168
|
+
}
|
|
169
|
+
return (0, _createClass2["default"])(FcrUIMemberListDataSourceImpl, [{
|
|
170
|
+
key: _ref,
|
|
171
|
+
get: function get() {
|
|
172
|
+
return _classPrivateFieldGet(_A, this);
|
|
173
|
+
}
|
|
174
|
+
}, {
|
|
175
|
+
key: "list",
|
|
176
|
+
set: function set(v) {
|
|
177
|
+
_classPrivateFieldSet(_A, this, v);
|
|
178
|
+
}
|
|
179
|
+
}, {
|
|
180
|
+
key: "resetList",
|
|
181
|
+
value: function resetList() {
|
|
182
|
+
return true;
|
|
183
|
+
}
|
|
184
|
+
}, {
|
|
185
|
+
key: "add",
|
|
186
|
+
value: function add(user, streams, isMySelf) {
|
|
187
|
+
var data = new FcrUIMemberDataImpl(user, streams, isMySelf);
|
|
188
|
+
this._insertEndByPriority(data, this.list, listLimitedCount);
|
|
189
|
+
return true;
|
|
190
|
+
}
|
|
191
|
+
}, {
|
|
192
|
+
key: "update",
|
|
193
|
+
value: function update(param, isBoardActive) {
|
|
194
|
+
if ((0, _typeof2["default"])(param) !== 'object') return false;
|
|
195
|
+
if ('streamId' in param) {
|
|
196
|
+
var data = this._findMemberDataByStream(param);
|
|
197
|
+
if (data) {
|
|
198
|
+
data.updateStream(param);
|
|
199
|
+
// 在update时,不对仅麦克风打开的用户进行排序提前
|
|
200
|
+
if (data.sortingPriority === _type.FcrUIMemberSortingPriority.MICROPHONE_OPEN) {
|
|
201
|
+
// 用户位置不变,但其他状态可能会变,强行触发一次 participantList 的更新
|
|
202
|
+
var currentIndex = this.list.findIndex(function (u) {
|
|
203
|
+
return u.userId === data.userId;
|
|
204
|
+
});
|
|
205
|
+
this.list[currentIndex] = data;
|
|
206
|
+
return true;
|
|
207
|
+
}
|
|
208
|
+
this._insertEndByPriority(data, this.list, listLimitedCount);
|
|
209
|
+
}
|
|
210
|
+
} else {
|
|
211
|
+
var _data = this.list.find(function (s) {
|
|
212
|
+
return s.userId === param.userId;
|
|
213
|
+
});
|
|
214
|
+
if (_data) {
|
|
215
|
+
_data.setUserInfo(_objectSpread(_objectSpread({}, param), {}, {
|
|
216
|
+
isBoardActive: isBoardActive
|
|
217
|
+
}));
|
|
218
|
+
// 在update时,不对仅麦克风打开的用户进行排序提前
|
|
219
|
+
if (_data.sortingPriority === _type.FcrUIMemberSortingPriority.MICROPHONE_OPEN) {
|
|
220
|
+
// 用户位置不变,但其他状态可能会变,强行触发一次 participantList 的更新
|
|
221
|
+
var _currentIndex = this.list.findIndex(function (u) {
|
|
222
|
+
return u.userId === _data.userId;
|
|
223
|
+
});
|
|
224
|
+
this.list[_currentIndex] = _data;
|
|
225
|
+
return true;
|
|
226
|
+
}
|
|
227
|
+
this._insertEndByPriority(_data, this.list, listLimitedCount);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
return true;
|
|
231
|
+
}
|
|
232
|
+
}, {
|
|
233
|
+
key: "updateWithStreamAdd",
|
|
234
|
+
value: function updateWithStreamAdd(stream) {
|
|
235
|
+
var data = this._findMemberDataByStream(stream);
|
|
236
|
+
if (data) {
|
|
237
|
+
data.addStream(stream);
|
|
238
|
+
this._insertEndByPriority(data, this.list, listLimitedCount);
|
|
239
|
+
}
|
|
240
|
+
return true;
|
|
241
|
+
}
|
|
242
|
+
}, {
|
|
243
|
+
key: "updateWithStreamRemove",
|
|
244
|
+
value: function updateWithStreamRemove(stream) {
|
|
245
|
+
var data = this._findMemberDataByStream(stream);
|
|
246
|
+
if (data) {
|
|
247
|
+
data.removeStream(stream.streamId);
|
|
248
|
+
this._insertEndByPriority(data, this.list, listLimitedCount);
|
|
249
|
+
}
|
|
250
|
+
return true;
|
|
251
|
+
}
|
|
252
|
+
}, {
|
|
253
|
+
key: "delete",
|
|
254
|
+
value: function _delete(user) {
|
|
255
|
+
var index = this.list.findIndex(function (s) {
|
|
256
|
+
return s.userId === user.userId;
|
|
257
|
+
});
|
|
258
|
+
if (index !== -1) {
|
|
259
|
+
this.list.splice(index, 1);
|
|
260
|
+
}
|
|
261
|
+
return true;
|
|
262
|
+
}
|
|
263
|
+
}, {
|
|
264
|
+
key: "_insertEndByPriority",
|
|
265
|
+
value: function _insertEndByPriority(item, list, listLimitedCount) {
|
|
266
|
+
var currentIndex = this.list.findIndex(function (u) {
|
|
267
|
+
return u.userId === item.userId;
|
|
268
|
+
});
|
|
269
|
+
if (currentIndex !== -1) {
|
|
270
|
+
list.splice(currentIndex, 1);
|
|
271
|
+
}
|
|
272
|
+
var index = this._findInsertEndIndex(item.sortingPriority, list);
|
|
273
|
+
list.splice(index, 0, item);
|
|
274
|
+
if (list.length > listLimitedCount) {
|
|
275
|
+
list.splice(listLimitedCount);
|
|
276
|
+
}
|
|
277
|
+
return index;
|
|
278
|
+
}
|
|
279
|
+
}, {
|
|
280
|
+
key: "_findInsertEndIndex",
|
|
281
|
+
value: function _findInsertEndIndex(priority, list) {
|
|
282
|
+
var index = list.findLastIndex(function (item) {
|
|
283
|
+
return item.sortingPriority >= priority;
|
|
284
|
+
});
|
|
285
|
+
if (index === -1) {
|
|
286
|
+
return 0;
|
|
287
|
+
} else {
|
|
288
|
+
return index + 1;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}, {
|
|
292
|
+
key: "_findMemberDataByStream",
|
|
293
|
+
value: function _findMemberDataByStream(stream) {
|
|
294
|
+
return this.list.find(function (s) {
|
|
295
|
+
return s.userId === stream.owner.userId;
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
}]);
|
|
299
|
+
}();
|
|
300
|
+
_FcrUIMemberListDataSourceImpl = FcrUIMemberListDataSourceImpl;
|
|
301
|
+
var _applyDecs$e = _applyDecs(_FcrUIMemberListDataSourceImpl, [[_mobx.observable, 1, "list"], [_resetListDecs, 18, "resetList"], [_addDecs, 18, "add"], [_deleteDecs, 18, "delete"], [_insertEndByPriorityDecs, 18, "_insertEndByPriority"]], []).e;
|
|
302
|
+
var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs$e, 2);
|
|
303
|
+
_init_list = _applyDecs$e2[0];
|
|
304
|
+
_initProto = _applyDecs$e2[1];
|
|
305
|
+
_applyDecs$e;
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { FcrMediaSourceState, FcrPrivilegeUserRole, FcrRoomConnectorType, FcrVideoSourceType } from 'fcr-core';
|
|
2
|
+
import { FcrPeerSessionControl } from 'fcr-core/lib/peer-session/type';
|
|
3
|
+
import { FcrUserInfo, FcrUserRole } from 'fcr-core/lib/type';
|
|
4
|
+
import { RoomType } from '../utilities/constant';
|
|
5
|
+
import { ParticipantActionType } from 'agora-ui-foundation/lib/components/participants/attendee';
|
|
6
|
+
import { FcrSecurityStore } from '../common/security-store';
|
|
7
|
+
import { RoomControlType } from '../utilities/constant';
|
|
8
|
+
import { FcrUIEventStore } from '../common/event-store';
|
|
9
|
+
import { FcrDeviceStore } from '../common/device-store';
|
|
10
|
+
import { FcrDeviceStreamStore } from '../common/device-stream-store';
|
|
11
|
+
import { FcrUIMemberData, ParticipantUser } from './type';
|
|
12
|
+
import { FcrUserKickedOutType } from 'fcr-core/lib/room-control/user-control/type';
|
|
13
|
+
import { FcrMainRoomControl } from 'fcr-core/lib/room-control/type';
|
|
14
|
+
import { FcrUIWindowType } from '../modules/layout/type';
|
|
15
|
+
export interface FcrUIVideoWindowData {
|
|
16
|
+
windowId: string;
|
|
17
|
+
type: FcrUIWindowType;
|
|
18
|
+
videoStreamId?: string;
|
|
19
|
+
audioStreamId?: string;
|
|
20
|
+
hasMicrophoneAudioStream: boolean;
|
|
21
|
+
hasLoopbackAudioStream: boolean;
|
|
22
|
+
hasVideoStream: boolean;
|
|
23
|
+
hasScreenSharing: boolean;
|
|
24
|
+
audioStreamConnectorType: FcrRoomConnectorType;
|
|
25
|
+
videoStreamConnectorType: FcrRoomConnectorType;
|
|
26
|
+
userId: string;
|
|
27
|
+
userName: string;
|
|
28
|
+
isMySelf: boolean;
|
|
29
|
+
isPin: boolean;
|
|
30
|
+
isSpeakerSpotlight: boolean;
|
|
31
|
+
videoSourceType: FcrVideoSourceType;
|
|
32
|
+
ownerRoleType: FcrUserRole;
|
|
33
|
+
sortingPriority: number;
|
|
34
|
+
phoneMicEnabled?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export declare enum EquipRequstType {
|
|
37
|
+
MICRO = 0,
|
|
38
|
+
VIDEO = 1
|
|
39
|
+
}
|
|
40
|
+
export declare class FcrParticipantStore {
|
|
41
|
+
private static MIN_USERS_TO_ENABLE_SPOTLIGHT;
|
|
42
|
+
protected logger: import("agora-foundation/lib/logger").Logger;
|
|
43
|
+
private _dataSource;
|
|
44
|
+
private _roomControl;
|
|
45
|
+
private _streamControl;
|
|
46
|
+
private _userControl;
|
|
47
|
+
private _waitingRoomControl?;
|
|
48
|
+
private _waitingRoomUserControl?;
|
|
49
|
+
private _peerSessionControl;
|
|
50
|
+
private _disposers;
|
|
51
|
+
private _dialogId?;
|
|
52
|
+
private _deviceStore;
|
|
53
|
+
private _deviceStreamStore;
|
|
54
|
+
private _unmuteAudioTimestamp;
|
|
55
|
+
private _unmuteVideoTimestamp;
|
|
56
|
+
private _processedUserOpenDeviceRequests;
|
|
57
|
+
private _securityStore;
|
|
58
|
+
private _uiEventStore;
|
|
59
|
+
private _lastReceiveSession;
|
|
60
|
+
private _streamsObserver;
|
|
61
|
+
private _peerSessionObserver;
|
|
62
|
+
private _userObserver;
|
|
63
|
+
private _eventObserver;
|
|
64
|
+
private _whitebaordObderver;
|
|
65
|
+
private accessor _mainList;
|
|
66
|
+
accessor _participantsWindowActive: boolean;
|
|
67
|
+
accessor currentPerspectiveType: 'host' | 'attendee' | 'cohost';
|
|
68
|
+
accessor screenSharingState: FcrMediaSourceState;
|
|
69
|
+
accessor enableParticipantsJoinWithMute: boolean;
|
|
70
|
+
accessor searchText: string;
|
|
71
|
+
accessor currentModal: 'modal' | 'window';
|
|
72
|
+
accessor localUserRole: FcrUserRole;
|
|
73
|
+
accessor spotlightUserId: string;
|
|
74
|
+
accessor enableSpotlight: boolean;
|
|
75
|
+
accessor mergeConfirmDialog: boolean;
|
|
76
|
+
accessor mergeUserId: string;
|
|
77
|
+
accessor activeTab: RoomType;
|
|
78
|
+
accessor isNewWaitingRoomUserEnter: boolean;
|
|
79
|
+
accessor waitingRoomUserCount: number;
|
|
80
|
+
accessor participantCount: number;
|
|
81
|
+
accessor requestEquipPopupShow: boolean;
|
|
82
|
+
accessor requestEquipType: EquipRequstType;
|
|
83
|
+
accessor requestEquipSenderRole: FcrUserRole;
|
|
84
|
+
get userListSource(): import("./member-list-data-source").FcrUIMemberDataImpl[];
|
|
85
|
+
get localUser(): ParticipantUser;
|
|
86
|
+
get mergeUserInfo(): FcrUserInfo | undefined;
|
|
87
|
+
get hostList(): import("./member-list-data-source").FcrUIMemberDataImpl[];
|
|
88
|
+
get userMap(): Map<string, FcrUIMemberData>;
|
|
89
|
+
get allowUnmuteSelfAudio(): boolean;
|
|
90
|
+
get allowJoinWithMuteAudio(): boolean;
|
|
91
|
+
get allowUnmuteSelfVideo(): boolean;
|
|
92
|
+
get isLockRoomEnabled(): boolean;
|
|
93
|
+
get isWaitingRoomEnabled(): boolean;
|
|
94
|
+
get allowChangeSelfName(): boolean;
|
|
95
|
+
get allowChat(): boolean;
|
|
96
|
+
get allowShareScreen(): boolean;
|
|
97
|
+
get pinedStreamIds(): string[];
|
|
98
|
+
get hasPinnedStream(): boolean;
|
|
99
|
+
get participantList(): ParticipantUser[];
|
|
100
|
+
get memberList(): ParticipantUser[];
|
|
101
|
+
get localMicVolume(): number;
|
|
102
|
+
get hasRevokeHostPermission(): boolean;
|
|
103
|
+
constructor({ roomControl, peerSessionControl, securityStore, uiEventStore, deviceStore, deviceStreamStore, }: {
|
|
104
|
+
roomControl: FcrMainRoomControl;
|
|
105
|
+
peerSessionControl: FcrPeerSessionControl;
|
|
106
|
+
securityStore: FcrSecurityStore;
|
|
107
|
+
uiEventStore: FcrUIEventStore;
|
|
108
|
+
deviceStore: FcrDeviceStore;
|
|
109
|
+
deviceStreamStore: FcrDeviceStreamStore;
|
|
110
|
+
});
|
|
111
|
+
setSpotlightUserId(userId: string): void;
|
|
112
|
+
release(): void;
|
|
113
|
+
allowedOperations: (userId: string, userRole: FcrUserRole) => string[];
|
|
114
|
+
checkIsPin: (userId: string) => boolean;
|
|
115
|
+
hasMutePermission(targetRole: FcrPrivilegeUserRole | FcrUserRole): boolean;
|
|
116
|
+
hasWaitingRoomPermission(): boolean;
|
|
117
|
+
hasUnmutePermission(targetRole: FcrPrivilegeUserRole | FcrUserRole): boolean;
|
|
118
|
+
hasRequestStartAudioPermission(targetRole: FcrPrivilegeUserRole | FcrUserRole): boolean;
|
|
119
|
+
setCurrentModal(modal: 'modal' | 'window'): void;
|
|
120
|
+
closeParticipantsAside(): void;
|
|
121
|
+
closeParticipantsWindow(): void;
|
|
122
|
+
openDialog(): void;
|
|
123
|
+
openConfirmDialog(params: {
|
|
124
|
+
title: string;
|
|
125
|
+
onCancel: () => void;
|
|
126
|
+
content: string;
|
|
127
|
+
onOk: () => void;
|
|
128
|
+
width?: number;
|
|
129
|
+
okText?: string;
|
|
130
|
+
cancelText?: string;
|
|
131
|
+
closable?: boolean;
|
|
132
|
+
height?: number;
|
|
133
|
+
}, _id: string): void;
|
|
134
|
+
setParticipantsWindowActive(active: boolean): void;
|
|
135
|
+
handlerSearchUser(searchText: string): void;
|
|
136
|
+
onInvite(): void;
|
|
137
|
+
setMergeConfirmDialog(visible: boolean): void;
|
|
138
|
+
mergeConfirmDialogOk(userId: string): void;
|
|
139
|
+
removePin(userId: string): void;
|
|
140
|
+
addPin(userId: string): void;
|
|
141
|
+
getAllowedOperations(targetRole: FcrUserRole, isSelf: boolean): string[];
|
|
142
|
+
handlerUserAction(action: ParticipantActionType, userId: string): void;
|
|
143
|
+
private _moveToWaitingRoomByUserIds;
|
|
144
|
+
removeWaitingRoomUser(userId: string, type: FcrUserKickedOutType): void;
|
|
145
|
+
kickOutWaitingRoomAllMember(type: FcrUserKickedOutType): Promise<void>;
|
|
146
|
+
moveToMainRoomAllMember(): Promise<void>;
|
|
147
|
+
handlerRoomControlAction(action: RoomControlType, data?: any): void;
|
|
148
|
+
private _handleEvent;
|
|
149
|
+
moveToMainRoomByUserIds(userId: string[]): void;
|
|
150
|
+
handleActiveTab(tab: RoomType): void;
|
|
151
|
+
formatUser: (user: FcrUIMemberData) => ParticipantUser;
|
|
152
|
+
private _muteUserAudio;
|
|
153
|
+
private _unmuteUserAudio;
|
|
154
|
+
private _muteUserVideo;
|
|
155
|
+
private _unmuteUserVideo;
|
|
156
|
+
private _privateChat;
|
|
157
|
+
private _handleSetHostOrCoHost;
|
|
158
|
+
private _setAsHost;
|
|
159
|
+
private _setAsCoHost;
|
|
160
|
+
private _setAsAttendee;
|
|
161
|
+
private _muteAllAudio;
|
|
162
|
+
private _unmuteAllAudio;
|
|
163
|
+
private _enableSelfUnmute;
|
|
164
|
+
private _enableOpenVideo;
|
|
165
|
+
private _revokeHost;
|
|
166
|
+
private _playJoinLeaveSound;
|
|
167
|
+
private _lockRoom;
|
|
168
|
+
private _enableWaitingRoom;
|
|
169
|
+
private _enableRename;
|
|
170
|
+
private enableJoinWithMuteAudio;
|
|
171
|
+
private _updateUserBoardState;
|
|
172
|
+
private _handleRemoteUserJoined;
|
|
173
|
+
private _handleRemoteUserLeft;
|
|
174
|
+
private _onLocalUserKickedout;
|
|
175
|
+
private _onUserInfoUpdated;
|
|
176
|
+
private _onAllUserCountUpdated;
|
|
177
|
+
private _initUserList;
|
|
178
|
+
private _handleStreamsAdded;
|
|
179
|
+
private _handleStreamsUpdated;
|
|
180
|
+
private _handleStreamsRemoved;
|
|
181
|
+
private _refreshCurrentPerspectiveType;
|
|
182
|
+
private _onPeerSessionReceived;
|
|
183
|
+
cancelRequestEquip(): void;
|
|
184
|
+
confirmRequestEquip(): void;
|
|
185
|
+
private _onPeerSessionAccepted;
|
|
186
|
+
private _onPeerSessionRejected;
|
|
187
|
+
private _updateSessionTimestamp;
|
|
188
|
+
private _isSetSpotlightEnable;
|
|
189
|
+
private _addReactions;
|
|
190
|
+
private _isHost;
|
|
191
|
+
private _updateLocalUserRole;
|
|
192
|
+
setRequestEquipPopupShow(show: boolean): void;
|
|
193
|
+
setRequestEquipType(requesttEquipType: EquipRequstType): void;
|
|
194
|
+
setRequestEquipSenderRole(requestEquipSenderRole: FcrUserRole): void;
|
|
195
|
+
}
|