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,642 @@
|
|
|
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.is-array.js");
|
|
9
|
+
require("core-js/modules/es.array.push.js");
|
|
10
|
+
require("core-js/modules/es.date.to-primitive.js");
|
|
11
|
+
require("core-js/modules/es.function.name.js");
|
|
12
|
+
require("core-js/modules/es.map.js");
|
|
13
|
+
require("core-js/modules/es.number.constructor.js");
|
|
14
|
+
require("core-js/modules/es.object.create.js");
|
|
15
|
+
require("core-js/modules/es.object.define-property.js");
|
|
16
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
17
|
+
require("core-js/modules/esnext.function.metadata.js");
|
|
18
|
+
require("core-js/modules/esnext.map.delete-all.js");
|
|
19
|
+
require("core-js/modules/esnext.map.emplace.js");
|
|
20
|
+
require("core-js/modules/esnext.map.every.js");
|
|
21
|
+
require("core-js/modules/esnext.map.filter.js");
|
|
22
|
+
require("core-js/modules/esnext.map.find.js");
|
|
23
|
+
require("core-js/modules/esnext.map.find-key.js");
|
|
24
|
+
require("core-js/modules/esnext.map.includes.js");
|
|
25
|
+
require("core-js/modules/esnext.map.key-of.js");
|
|
26
|
+
require("core-js/modules/esnext.map.map-keys.js");
|
|
27
|
+
require("core-js/modules/esnext.map.map-values.js");
|
|
28
|
+
require("core-js/modules/esnext.map.merge.js");
|
|
29
|
+
require("core-js/modules/esnext.map.reduce.js");
|
|
30
|
+
require("core-js/modules/esnext.map.some.js");
|
|
31
|
+
require("core-js/modules/esnext.map.update.js");
|
|
32
|
+
require("core-js/modules/esnext.symbol.metadata.js");
|
|
33
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
34
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
35
|
+
Object.defineProperty(exports, "__esModule", {
|
|
36
|
+
value: true
|
|
37
|
+
});
|
|
38
|
+
exports.FcrDeviceStore = void 0;
|
|
39
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
40
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
41
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
42
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
43
|
+
require("core-js/modules/es.array.for-each.js");
|
|
44
|
+
require("core-js/modules/es.array.iterator.js");
|
|
45
|
+
require("core-js/modules/es.array.map.js");
|
|
46
|
+
require("core-js/modules/es.function.bind.js");
|
|
47
|
+
require("core-js/modules/es.object.to-string.js");
|
|
48
|
+
require("core-js/modules/es.set.js");
|
|
49
|
+
require("core-js/modules/es.string.iterator.js");
|
|
50
|
+
require("core-js/modules/es.weak-map.js");
|
|
51
|
+
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
52
|
+
require("core-js/modules/esnext.async-iterator.map.js");
|
|
53
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
54
|
+
require("core-js/modules/esnext.iterator.for-each.js");
|
|
55
|
+
require("core-js/modules/esnext.iterator.map.js");
|
|
56
|
+
require("core-js/modules/esnext.set.add-all.js");
|
|
57
|
+
require("core-js/modules/esnext.set.delete-all.js");
|
|
58
|
+
require("core-js/modules/esnext.set.difference.v2.js");
|
|
59
|
+
require("core-js/modules/esnext.set.difference.js");
|
|
60
|
+
require("core-js/modules/esnext.set.every.js");
|
|
61
|
+
require("core-js/modules/esnext.set.filter.js");
|
|
62
|
+
require("core-js/modules/esnext.set.find.js");
|
|
63
|
+
require("core-js/modules/esnext.set.intersection.v2.js");
|
|
64
|
+
require("core-js/modules/esnext.set.intersection.js");
|
|
65
|
+
require("core-js/modules/esnext.set.is-disjoint-from.v2.js");
|
|
66
|
+
require("core-js/modules/esnext.set.is-disjoint-from.js");
|
|
67
|
+
require("core-js/modules/esnext.set.is-subset-of.v2.js");
|
|
68
|
+
require("core-js/modules/esnext.set.is-subset-of.js");
|
|
69
|
+
require("core-js/modules/esnext.set.is-superset-of.v2.js");
|
|
70
|
+
require("core-js/modules/esnext.set.is-superset-of.js");
|
|
71
|
+
require("core-js/modules/esnext.set.join.js");
|
|
72
|
+
require("core-js/modules/esnext.set.map.js");
|
|
73
|
+
require("core-js/modules/esnext.set.reduce.js");
|
|
74
|
+
require("core-js/modules/esnext.set.some.js");
|
|
75
|
+
require("core-js/modules/esnext.set.symmetric-difference.v2.js");
|
|
76
|
+
require("core-js/modules/esnext.set.symmetric-difference.js");
|
|
77
|
+
require("core-js/modules/esnext.set.union.v2.js");
|
|
78
|
+
require("core-js/modules/esnext.set.union.js");
|
|
79
|
+
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
80
|
+
require("core-js/modules/esnext.weak-map.emplace.js");
|
|
81
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
82
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
83
|
+
var _logger = require("agora-foundation/lib/logger");
|
|
84
|
+
var _mobx = require("mobx");
|
|
85
|
+
var _type = require("fcr-core/lib/type");
|
|
86
|
+
var _decorator = require("agora-foundation/lib/decorator");
|
|
87
|
+
var _localVideoPlayer = require("agora-ui-foundation/lib/components/local-video-player");
|
|
88
|
+
var _observable = require("agora-foundation/lib/utilities/observable");
|
|
89
|
+
var _fcrCore = require("fcr-core");
|
|
90
|
+
var _FcrDeviceStore;
|
|
91
|
+
var _initProto, _init__microphoneDeviceId, _init__speakerDeviceId, _init_currentIsMirror, _init_showForceOpenEffectDialog, _init_cameraId, _init_microphoneId, _init_speakerId, _init_cameraEnabled, _init_showCameraPreview, _init_microphoneEnabled, _init_cameraList, _init_microphoneList, _init_microphoneVolumeLevel, _init_speakerList, _init_isLocalMirrorEnabled, _init_isLocalEditBeautyOptions, _init_speakerVolumeLevel, _init_speakerVolume, _init_microphoneVolume, _init_currentVirtualBackgroundName, _init_enableBeauty, _init_currentBeautyKey, _init_beautyOptions, _init_microphoneDetecting, _init_speakerDetecting, _init_autoPlayFailedDialogShow, _setAutoPlayFailedDialogShowDecs, _startPlayLocalVideoDecs, _stopPlayLocalVideoDecs, _setCurrentIsMirrorDecs, _toggleLocalMirrorPreviewDecs, _setCameraEnabledDecs, _setMicrophoneEnabledDecs, _toggleLocalMirrorDecs, _resetMirrorDecs, _setEditBeautyKeyDecs, _handleMicrophoneVolumeIndicationUpdatedDecs, _handleMicrophoneStateUpdatedDecs, _ref;
|
|
92
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
93
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
94
|
+
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
95
|
+
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
96
|
+
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"); }
|
|
97
|
+
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" == _typeof(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)]; } }; }
|
|
98
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
99
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
100
|
+
function _setFunctionName(e, t, n) { "symbol" == _typeof(t) && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; }
|
|
101
|
+
function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? _typeof(e) : "null")); return e; }
|
|
102
|
+
// device id for default device (follow system)
|
|
103
|
+
var DEFAULT_DEVICE_ID = process.env.Dev === 'true' ? 'default' : 'default';
|
|
104
|
+
var mapDevice2Option = function mapDevice2Option(deviceList) {
|
|
105
|
+
return deviceList.map(function (item) {
|
|
106
|
+
return {
|
|
107
|
+
text: item.deviceName,
|
|
108
|
+
value: item.deviceId
|
|
109
|
+
};
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
var _A = /*#__PURE__*/new WeakMap();
|
|
113
|
+
var _B = /*#__PURE__*/new WeakMap();
|
|
114
|
+
var _C = /*#__PURE__*/new WeakMap();
|
|
115
|
+
var _D = /*#__PURE__*/new WeakMap();
|
|
116
|
+
var _E = /*#__PURE__*/new WeakMap();
|
|
117
|
+
var _F = /*#__PURE__*/new WeakMap();
|
|
118
|
+
var _G = /*#__PURE__*/new WeakMap();
|
|
119
|
+
var _H = /*#__PURE__*/new WeakMap();
|
|
120
|
+
var _I = /*#__PURE__*/new WeakMap();
|
|
121
|
+
var _J = /*#__PURE__*/new WeakMap();
|
|
122
|
+
var _K = /*#__PURE__*/new WeakMap();
|
|
123
|
+
var _L = /*#__PURE__*/new WeakMap();
|
|
124
|
+
var _M = /*#__PURE__*/new WeakMap();
|
|
125
|
+
var _N = /*#__PURE__*/new WeakMap();
|
|
126
|
+
var _O = /*#__PURE__*/new WeakMap();
|
|
127
|
+
var _P = /*#__PURE__*/new WeakMap();
|
|
128
|
+
var _Q = /*#__PURE__*/new WeakMap();
|
|
129
|
+
var _R = /*#__PURE__*/new WeakMap();
|
|
130
|
+
var _S = /*#__PURE__*/new WeakMap();
|
|
131
|
+
var _T = /*#__PURE__*/new WeakMap();
|
|
132
|
+
var _U = /*#__PURE__*/new WeakMap();
|
|
133
|
+
var _V = /*#__PURE__*/new WeakMap();
|
|
134
|
+
var _W = /*#__PURE__*/new WeakMap();
|
|
135
|
+
var _X = /*#__PURE__*/new WeakMap();
|
|
136
|
+
var _Y = /*#__PURE__*/new WeakMap();
|
|
137
|
+
var _Z = /*#__PURE__*/new WeakMap();
|
|
138
|
+
_ref = (_setAutoPlayFailedDialogShowDecs = [_mobx.action, _mobx.action.bound], _startPlayLocalVideoDecs = [_mobx.action, _mobx.action.bound], _stopPlayLocalVideoDecs = [_mobx.action, _mobx.action.bound], _setCurrentIsMirrorDecs = [_mobx.action, _mobx.action.bound], _toggleLocalMirrorPreviewDecs = [_mobx.action, _mobx.action.bound], _setCameraEnabledDecs = [_mobx.action, _mobx.action.bound], _setMicrophoneEnabledDecs = [_mobx.action, _mobx.action.bound], _toggleLocalMirrorDecs = [_mobx.action, _mobx.action.bound], _resetMirrorDecs = [_mobx.action, _mobx.action.bound], _setEditBeautyKeyDecs = [_mobx.action, _mobx.action.bound], _handleMicrophoneVolumeIndicationUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleMicrophoneStateUpdatedDecs = [_mobx.action, _mobx.action.bound], "logger");
|
|
139
|
+
var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
140
|
+
function FcrDeviceStore(_userName, _mediaControl) {
|
|
141
|
+
(0, _classCallCheck2["default"])(this, FcrDeviceStore);
|
|
142
|
+
(0, _defineProperty2["default"])(this, _ref, (_initProto(this), (0, _logger.getLogger)()));
|
|
143
|
+
(0, _defineProperty2["default"])(this, "_observable", new _observable.AgoraObservable());
|
|
144
|
+
(0, _defineProperty2["default"])(this, "_localVideoViewSet", new Set());
|
|
145
|
+
(0, _defineProperty2["default"])(this, "_defaultMirror", true);
|
|
146
|
+
(0, _defineProperty2["default"])(this, "_mediaObserver", {
|
|
147
|
+
onAutoPlayFailed: this._handleAutoPlayFailed.bind(this),
|
|
148
|
+
onMicrophoneVolumeIndicationUpdated: this._handleMicrophoneVolumeIndicationUpdated,
|
|
149
|
+
onMicrophoneStateUpdated: this._handleMicrophoneStateUpdated
|
|
150
|
+
});
|
|
151
|
+
// real microphone device id
|
|
152
|
+
_classPrivateFieldInitSpec(this, _A, _init__microphoneDeviceId(this, ''));
|
|
153
|
+
// real speaker device id
|
|
154
|
+
_classPrivateFieldInitSpec(this, _B, _init__speakerDeviceId(this, ''));
|
|
155
|
+
// 是否开启镜像
|
|
156
|
+
_classPrivateFieldInitSpec(this, _C, _init_currentIsMirror(this, true));
|
|
157
|
+
// 是否展示展示强制开启特效弹窗
|
|
158
|
+
_classPrivateFieldInitSpec(this, _D, _init_showForceOpenEffectDialog(this, false));
|
|
159
|
+
// selected camera id, it is the real device id
|
|
160
|
+
_classPrivateFieldInitSpec(this, _E, _init_cameraId(this, ''));
|
|
161
|
+
// selected microphone id, for ui display, could be 'default' or real device id
|
|
162
|
+
_classPrivateFieldInitSpec(this, _F, _init_microphoneId(this, 'default'));
|
|
163
|
+
// selected speaker id, for ui display, could be 'default' or real device id
|
|
164
|
+
_classPrivateFieldInitSpec(this, _G, _init_speakerId(this, ''));
|
|
165
|
+
_classPrivateFieldInitSpec(this, _H, _init_cameraEnabled(this, false));
|
|
166
|
+
_classPrivateFieldInitSpec(this, _I, _init_showCameraPreview(this, false));
|
|
167
|
+
_classPrivateFieldInitSpec(this, _J, _init_microphoneEnabled(this, false));
|
|
168
|
+
_classPrivateFieldInitSpec(this, _K, _init_cameraList(this, []));
|
|
169
|
+
_classPrivateFieldInitSpec(this, _L, _init_microphoneList(this, []));
|
|
170
|
+
_classPrivateFieldInitSpec(this, _M, _init_microphoneVolumeLevel(this, 0));
|
|
171
|
+
_classPrivateFieldInitSpec(this, _N, _init_speakerList(this, []));
|
|
172
|
+
_classPrivateFieldInitSpec(this, _O, _init_isLocalMirrorEnabled(this, true));
|
|
173
|
+
_classPrivateFieldInitSpec(this, _P, _init_isLocalEditBeautyOptions(this, false));
|
|
174
|
+
_classPrivateFieldInitSpec(this, _Q, _init_speakerVolumeLevel(this, 0));
|
|
175
|
+
_classPrivateFieldInitSpec(this, _R, _init_speakerVolume(this, 30));
|
|
176
|
+
_classPrivateFieldInitSpec(this, _S, _init_microphoneVolume(this, 100));
|
|
177
|
+
_classPrivateFieldInitSpec(this, _T, _init_currentVirtualBackgroundName(this, 'None'));
|
|
178
|
+
_classPrivateFieldInitSpec(this, _U, _init_enableBeauty(this, false));
|
|
179
|
+
_classPrivateFieldInitSpec(this, _V, _init_currentBeautyKey(this, 'none'));
|
|
180
|
+
_classPrivateFieldInitSpec(this, _W, _init_beautyOptions(this, {
|
|
181
|
+
lighteningContrastLevel: 0,
|
|
182
|
+
lighteningLevel: _localVideoPlayer.DEFAULT_BEAUTY_VALUE,
|
|
183
|
+
smoothnessLevel: _localVideoPlayer.DEFAULT_BEAUTY_VALUE,
|
|
184
|
+
sharpnessLevel: _localVideoPlayer.DEFAULT_BEAUTY_VALUE,
|
|
185
|
+
rednessLevel: _localVideoPlayer.DEFAULT_BEAUTY_VALUE
|
|
186
|
+
}));
|
|
187
|
+
_classPrivateFieldInitSpec(this, _X, _init_microphoneDetecting(this, false));
|
|
188
|
+
_classPrivateFieldInitSpec(this, _Y, _init_speakerDetecting(this, false));
|
|
189
|
+
_classPrivateFieldInitSpec(this, _Z, _init_autoPlayFailedDialogShow(this, false));
|
|
190
|
+
this._userName = _userName;
|
|
191
|
+
this._mediaControl = _mediaControl;
|
|
192
|
+
_mediaControl.addObserver(this._mediaObserver);
|
|
193
|
+
}
|
|
194
|
+
return (0, _createClass2["default"])(FcrDeviceStore, [{
|
|
195
|
+
key: "_microphoneDeviceId",
|
|
196
|
+
get: function get() {
|
|
197
|
+
return _classPrivateFieldGet(_A, this);
|
|
198
|
+
},
|
|
199
|
+
set: function set(v) {
|
|
200
|
+
_classPrivateFieldSet(_A, this, v);
|
|
201
|
+
}
|
|
202
|
+
}, {
|
|
203
|
+
key: "_speakerDeviceId",
|
|
204
|
+
get: function get() {
|
|
205
|
+
return _classPrivateFieldGet(_B, this);
|
|
206
|
+
},
|
|
207
|
+
set: function set(v) {
|
|
208
|
+
_classPrivateFieldSet(_B, this, v);
|
|
209
|
+
}
|
|
210
|
+
}, {
|
|
211
|
+
key: "currentIsMirror",
|
|
212
|
+
get: function get() {
|
|
213
|
+
return _classPrivateFieldGet(_C, this);
|
|
214
|
+
},
|
|
215
|
+
set: function set(v) {
|
|
216
|
+
_classPrivateFieldSet(_C, this, v);
|
|
217
|
+
}
|
|
218
|
+
}, {
|
|
219
|
+
key: "showForceOpenEffectDialog",
|
|
220
|
+
get: function get() {
|
|
221
|
+
return _classPrivateFieldGet(_D, this);
|
|
222
|
+
},
|
|
223
|
+
set: function set(v) {
|
|
224
|
+
_classPrivateFieldSet(_D, this, v);
|
|
225
|
+
}
|
|
226
|
+
}, {
|
|
227
|
+
key: "cameraId",
|
|
228
|
+
get: function get() {
|
|
229
|
+
return _classPrivateFieldGet(_E, this);
|
|
230
|
+
},
|
|
231
|
+
set: function set(v) {
|
|
232
|
+
_classPrivateFieldSet(_E, this, v);
|
|
233
|
+
}
|
|
234
|
+
}, {
|
|
235
|
+
key: "microphoneId",
|
|
236
|
+
get: function get() {
|
|
237
|
+
return _classPrivateFieldGet(_F, this);
|
|
238
|
+
},
|
|
239
|
+
set: function set(v) {
|
|
240
|
+
_classPrivateFieldSet(_F, this, v);
|
|
241
|
+
}
|
|
242
|
+
}, {
|
|
243
|
+
key: "speakerId",
|
|
244
|
+
get: function get() {
|
|
245
|
+
return _classPrivateFieldGet(_G, this);
|
|
246
|
+
},
|
|
247
|
+
set: function set(v) {
|
|
248
|
+
_classPrivateFieldSet(_G, this, v);
|
|
249
|
+
}
|
|
250
|
+
}, {
|
|
251
|
+
key: "cameraEnabled",
|
|
252
|
+
get: function get() {
|
|
253
|
+
return _classPrivateFieldGet(_H, this);
|
|
254
|
+
},
|
|
255
|
+
set: function set(v) {
|
|
256
|
+
_classPrivateFieldSet(_H, this, v);
|
|
257
|
+
}
|
|
258
|
+
}, {
|
|
259
|
+
key: "showCameraPreview",
|
|
260
|
+
get: function get() {
|
|
261
|
+
return _classPrivateFieldGet(_I, this);
|
|
262
|
+
},
|
|
263
|
+
set: function set(v) {
|
|
264
|
+
_classPrivateFieldSet(_I, this, v);
|
|
265
|
+
}
|
|
266
|
+
}, {
|
|
267
|
+
key: "microphoneEnabled",
|
|
268
|
+
get: function get() {
|
|
269
|
+
return _classPrivateFieldGet(_J, this);
|
|
270
|
+
},
|
|
271
|
+
set: function set(v) {
|
|
272
|
+
_classPrivateFieldSet(_J, this, v);
|
|
273
|
+
}
|
|
274
|
+
}, {
|
|
275
|
+
key: "cameraList",
|
|
276
|
+
get: function get() {
|
|
277
|
+
return _classPrivateFieldGet(_K, this);
|
|
278
|
+
},
|
|
279
|
+
set: function set(v) {
|
|
280
|
+
_classPrivateFieldSet(_K, this, v);
|
|
281
|
+
}
|
|
282
|
+
}, {
|
|
283
|
+
key: "microphoneList",
|
|
284
|
+
get: function get() {
|
|
285
|
+
return _classPrivateFieldGet(_L, this);
|
|
286
|
+
},
|
|
287
|
+
set: function set(v) {
|
|
288
|
+
_classPrivateFieldSet(_L, this, v);
|
|
289
|
+
}
|
|
290
|
+
}, {
|
|
291
|
+
key: "microphoneVolumeLevel",
|
|
292
|
+
get: function get() {
|
|
293
|
+
return _classPrivateFieldGet(_M, this);
|
|
294
|
+
},
|
|
295
|
+
set: function set(v) {
|
|
296
|
+
_classPrivateFieldSet(_M, this, v);
|
|
297
|
+
}
|
|
298
|
+
}, {
|
|
299
|
+
key: "speakerList",
|
|
300
|
+
get: function get() {
|
|
301
|
+
return _classPrivateFieldGet(_N, this);
|
|
302
|
+
},
|
|
303
|
+
set: function set(v) {
|
|
304
|
+
_classPrivateFieldSet(_N, this, v);
|
|
305
|
+
}
|
|
306
|
+
}, {
|
|
307
|
+
key: "isLocalMirrorEnabled",
|
|
308
|
+
get: function get() {
|
|
309
|
+
return _classPrivateFieldGet(_O, this);
|
|
310
|
+
},
|
|
311
|
+
set: function set(v) {
|
|
312
|
+
_classPrivateFieldSet(_O, this, v);
|
|
313
|
+
}
|
|
314
|
+
}, {
|
|
315
|
+
key: "isLocalEditBeautyOptions",
|
|
316
|
+
get: function get() {
|
|
317
|
+
return _classPrivateFieldGet(_P, this);
|
|
318
|
+
},
|
|
319
|
+
set: function set(v) {
|
|
320
|
+
_classPrivateFieldSet(_P, this, v);
|
|
321
|
+
}
|
|
322
|
+
}, {
|
|
323
|
+
key: "speakerVolumeLevel",
|
|
324
|
+
get: function get() {
|
|
325
|
+
return _classPrivateFieldGet(_Q, this);
|
|
326
|
+
},
|
|
327
|
+
set: function set(v) {
|
|
328
|
+
_classPrivateFieldSet(_Q, this, v);
|
|
329
|
+
}
|
|
330
|
+
}, {
|
|
331
|
+
key: "speakerVolume",
|
|
332
|
+
get: function get() {
|
|
333
|
+
return _classPrivateFieldGet(_R, this);
|
|
334
|
+
},
|
|
335
|
+
set: function set(v) {
|
|
336
|
+
_classPrivateFieldSet(_R, this, v);
|
|
337
|
+
}
|
|
338
|
+
}, {
|
|
339
|
+
key: "microphoneVolume",
|
|
340
|
+
get: function get() {
|
|
341
|
+
return _classPrivateFieldGet(_S, this);
|
|
342
|
+
},
|
|
343
|
+
set: function set(v) {
|
|
344
|
+
_classPrivateFieldSet(_S, this, v);
|
|
345
|
+
}
|
|
346
|
+
}, {
|
|
347
|
+
key: "currentVirtualBackgroundName",
|
|
348
|
+
get: function get() {
|
|
349
|
+
return _classPrivateFieldGet(_T, this);
|
|
350
|
+
},
|
|
351
|
+
set: function set(v) {
|
|
352
|
+
_classPrivateFieldSet(_T, this, v);
|
|
353
|
+
}
|
|
354
|
+
}, {
|
|
355
|
+
key: "enableBeauty",
|
|
356
|
+
get: function get() {
|
|
357
|
+
return _classPrivateFieldGet(_U, this);
|
|
358
|
+
},
|
|
359
|
+
set: function set(v) {
|
|
360
|
+
_classPrivateFieldSet(_U, this, v);
|
|
361
|
+
}
|
|
362
|
+
}, {
|
|
363
|
+
key: "currentBeautyKey",
|
|
364
|
+
get: function get() {
|
|
365
|
+
return _classPrivateFieldGet(_V, this);
|
|
366
|
+
},
|
|
367
|
+
set: function set(v) {
|
|
368
|
+
_classPrivateFieldSet(_V, this, v);
|
|
369
|
+
}
|
|
370
|
+
}, {
|
|
371
|
+
key: "beautyOptions",
|
|
372
|
+
get: function get() {
|
|
373
|
+
return _classPrivateFieldGet(_W, this);
|
|
374
|
+
},
|
|
375
|
+
set: function set(v) {
|
|
376
|
+
_classPrivateFieldSet(_W, this, v);
|
|
377
|
+
}
|
|
378
|
+
}, {
|
|
379
|
+
key: "microphoneDetecting",
|
|
380
|
+
get: function get() {
|
|
381
|
+
return _classPrivateFieldGet(_X, this);
|
|
382
|
+
},
|
|
383
|
+
set: function set(v) {
|
|
384
|
+
_classPrivateFieldSet(_X, this, v);
|
|
385
|
+
}
|
|
386
|
+
}, {
|
|
387
|
+
key: "speakerDetecting",
|
|
388
|
+
get: function get() {
|
|
389
|
+
return _classPrivateFieldGet(_Y, this);
|
|
390
|
+
},
|
|
391
|
+
set: function set(v) {
|
|
392
|
+
_classPrivateFieldSet(_Y, this, v);
|
|
393
|
+
}
|
|
394
|
+
}, {
|
|
395
|
+
key: "autoPlayFailedDialogShow",
|
|
396
|
+
get: function get() {
|
|
397
|
+
return _classPrivateFieldGet(_Z, this);
|
|
398
|
+
},
|
|
399
|
+
set: function set(v) {
|
|
400
|
+
_classPrivateFieldSet(_Z, this, v);
|
|
401
|
+
}
|
|
402
|
+
}, {
|
|
403
|
+
key: "defaultMirror",
|
|
404
|
+
get: function get() {
|
|
405
|
+
return this._defaultMirror;
|
|
406
|
+
}
|
|
407
|
+
}, {
|
|
408
|
+
key: "userName",
|
|
409
|
+
get: function get() {
|
|
410
|
+
return this._userName;
|
|
411
|
+
}
|
|
412
|
+
}, {
|
|
413
|
+
key: "followSystemMicrophoneDevice",
|
|
414
|
+
get: function get() {
|
|
415
|
+
return this.microphoneId === DEFAULT_DEVICE_ID;
|
|
416
|
+
}
|
|
417
|
+
}, {
|
|
418
|
+
key: "followSystemSpeakerDevice",
|
|
419
|
+
get: function get() {
|
|
420
|
+
return this.speakerId === DEFAULT_DEVICE_ID;
|
|
421
|
+
}
|
|
422
|
+
}, {
|
|
423
|
+
key: "cameraDeviceList",
|
|
424
|
+
get: function get() {
|
|
425
|
+
return mapDevice2Option(this.cameraList);
|
|
426
|
+
}
|
|
427
|
+
}, {
|
|
428
|
+
key: "microphoneDeviceList",
|
|
429
|
+
get: function get() {
|
|
430
|
+
return mapDevice2Option(this.microphoneList);
|
|
431
|
+
}
|
|
432
|
+
}, {
|
|
433
|
+
key: "speakerDeviceList",
|
|
434
|
+
get: function get() {
|
|
435
|
+
return mapDevice2Option(this.speakerList);
|
|
436
|
+
}
|
|
437
|
+
}, {
|
|
438
|
+
key: "currentDeviceId",
|
|
439
|
+
get: function get() {
|
|
440
|
+
return {
|
|
441
|
+
cameraDeviceId: this.cameraId,
|
|
442
|
+
microphoneDeviceId: this._microphoneDeviceId,
|
|
443
|
+
speakerDeviceId: this._speakerDeviceId
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
}, {
|
|
447
|
+
key: "addObserver",
|
|
448
|
+
value: function addObserver(observer) {
|
|
449
|
+
this._observable.addObserver(observer);
|
|
450
|
+
}
|
|
451
|
+
}, {
|
|
452
|
+
key: "removeObserver",
|
|
453
|
+
value: function removeObserver(observer) {
|
|
454
|
+
this._observable.removeObserver(observer);
|
|
455
|
+
}
|
|
456
|
+
}, {
|
|
457
|
+
key: "_handleAutoPlayFailed",
|
|
458
|
+
value: function _handleAutoPlayFailed() {
|
|
459
|
+
this.logger.warn('[FcrDeviceStore] current h5 _handleAutoPlayFailed');
|
|
460
|
+
this.setAutoPlayFailedDialogShow(true);
|
|
461
|
+
}
|
|
462
|
+
}, {
|
|
463
|
+
key: "setAutoPlayFailedDialogShow",
|
|
464
|
+
value: function setAutoPlayFailedDialogShow(flag) {
|
|
465
|
+
this.autoPlayFailedDialogShow = flag;
|
|
466
|
+
}
|
|
467
|
+
}, {
|
|
468
|
+
key: "startPlayLocalVideo",
|
|
469
|
+
value: function startPlayLocalVideo(view) {
|
|
470
|
+
var isMirror = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.currentIsMirror;
|
|
471
|
+
if (!view) return;
|
|
472
|
+
this._localVideoViewSet.add(view);
|
|
473
|
+
this._mediaControl.startCameraPreview(view, {
|
|
474
|
+
renderMode: _fcrCore.FcrVideoRenderMode.HIDDEN,
|
|
475
|
+
isMirror: isMirror
|
|
476
|
+
});
|
|
477
|
+
this.currentIsMirror = isMirror;
|
|
478
|
+
}
|
|
479
|
+
}, {
|
|
480
|
+
key: "stopPlayLocalVideo",
|
|
481
|
+
value: function stopPlayLocalVideo(view) {
|
|
482
|
+
if (!view) return;
|
|
483
|
+
this._localVideoViewSet["delete"](view);
|
|
484
|
+
this._mediaControl.stopCameraPreview(view);
|
|
485
|
+
}
|
|
486
|
+
}, {
|
|
487
|
+
key: "switchCamera",
|
|
488
|
+
value: function switchCamera() {
|
|
489
|
+
this._mediaControl.switchCamera();
|
|
490
|
+
}
|
|
491
|
+
}, {
|
|
492
|
+
key: "setCurrentIsMirror",
|
|
493
|
+
value: function setCurrentIsMirror(isMirror) {
|
|
494
|
+
this.currentIsMirror = isMirror;
|
|
495
|
+
}
|
|
496
|
+
}, {
|
|
497
|
+
key: "toggleLocalMirrorPreview",
|
|
498
|
+
value: function toggleLocalMirrorPreview(isMirror) {
|
|
499
|
+
var _this = this;
|
|
500
|
+
this.currentIsMirror = isMirror;
|
|
501
|
+
this._localVideoViewSet.forEach(function (view) {
|
|
502
|
+
_this._mediaControl.stopCameraPreview(view);
|
|
503
|
+
_this._mediaControl.startCameraPreview(view, {
|
|
504
|
+
renderMode: _fcrCore.FcrVideoRenderMode.HIDDEN,
|
|
505
|
+
isMirror: isMirror
|
|
506
|
+
});
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
}, {
|
|
510
|
+
key: "setCameraEnabled",
|
|
511
|
+
value: function setCameraEnabled(enable) {
|
|
512
|
+
if (enable) {
|
|
513
|
+
this._mediaControl.openDevice(_type.FcrDeviceType.Camera);
|
|
514
|
+
} else {
|
|
515
|
+
this._mediaControl.closeDevice(_type.FcrDeviceType.Camera);
|
|
516
|
+
}
|
|
517
|
+
this.setShowCameraPreview(enable);
|
|
518
|
+
this.cameraEnabled = enable;
|
|
519
|
+
}
|
|
520
|
+
}, {
|
|
521
|
+
key: "setMicrophoneEnabled",
|
|
522
|
+
value: function setMicrophoneEnabled(enable) {
|
|
523
|
+
if (enable) {
|
|
524
|
+
this._mediaControl.openDevice(_type.FcrDeviceType.Microphone);
|
|
525
|
+
} else {
|
|
526
|
+
this._mediaControl.closeDevice(_type.FcrDeviceType.Microphone);
|
|
527
|
+
}
|
|
528
|
+
this.microphoneEnabled = enable;
|
|
529
|
+
}
|
|
530
|
+
}, {
|
|
531
|
+
key: "toggleLocalMirror",
|
|
532
|
+
value: function toggleLocalMirror(enable) {
|
|
533
|
+
this._defaultMirror = enable;
|
|
534
|
+
this.isLocalMirrorEnabled = enable;
|
|
535
|
+
this.toggleLocalMirrorPreview(enable);
|
|
536
|
+
}
|
|
537
|
+
}, {
|
|
538
|
+
key: "resetMirror",
|
|
539
|
+
value: function resetMirror() {
|
|
540
|
+
this.isLocalMirrorEnabled = false;
|
|
541
|
+
this.setCurrentIsMirror(false);
|
|
542
|
+
}
|
|
543
|
+
}, {
|
|
544
|
+
key: "setEditBeautyKey",
|
|
545
|
+
value: function setEditBeautyKey(key) {
|
|
546
|
+
this.isLocalEditBeautyOptions = key !== 'none';
|
|
547
|
+
this.currentBeautyKey = key;
|
|
548
|
+
}
|
|
549
|
+
}, {
|
|
550
|
+
key: "startOrStopCamera",
|
|
551
|
+
value: function startOrStopCamera(enable) {
|
|
552
|
+
var _this2 = this;
|
|
553
|
+
var localVideoViewSet = this._localVideoViewSet;
|
|
554
|
+
if (enable) {
|
|
555
|
+
this.openFirstCamera();
|
|
556
|
+
} else {
|
|
557
|
+
if (localVideoViewSet.size > 0) {
|
|
558
|
+
localVideoViewSet.forEach(function (view) {
|
|
559
|
+
_this2._mediaControl.stopCameraPreview(view);
|
|
560
|
+
});
|
|
561
|
+
}
|
|
562
|
+
this._mediaControl.closeDevice(_type.FcrDeviceType.Camera);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
}, {
|
|
566
|
+
key: "setShowCameraPreview",
|
|
567
|
+
value: function setShowCameraPreview(enable) {
|
|
568
|
+
this.showCameraPreview = enable;
|
|
569
|
+
}
|
|
570
|
+
}, {
|
|
571
|
+
key: "handleRealCameraEnabledChanged",
|
|
572
|
+
value: function handleRealCameraEnabledChanged(realEnable) {
|
|
573
|
+
this.startOrStopCamera(realEnable);
|
|
574
|
+
this.setShowCameraPreview(realEnable);
|
|
575
|
+
}
|
|
576
|
+
}, {
|
|
577
|
+
key: "release",
|
|
578
|
+
value: function release() {
|
|
579
|
+
var _this3 = this;
|
|
580
|
+
if (this._localVideoViewSet.size > 0) {
|
|
581
|
+
this._localVideoViewSet.forEach(function (view) {
|
|
582
|
+
_this3._mediaControl.stopCameraPreview(view);
|
|
583
|
+
});
|
|
584
|
+
this._localVideoViewSet.clear();
|
|
585
|
+
}
|
|
586
|
+
this._mediaControl.removeObserver(this._mediaObserver);
|
|
587
|
+
}
|
|
588
|
+
}, {
|
|
589
|
+
key: "openFirstCamera",
|
|
590
|
+
value: function openFirstCamera() {
|
|
591
|
+
this._mediaControl.openDevice(_type.FcrDeviceType.Camera);
|
|
592
|
+
}
|
|
593
|
+
}, {
|
|
594
|
+
key: "openFirstMicrophone",
|
|
595
|
+
value: function openFirstMicrophone() {
|
|
596
|
+
this._mediaControl.closeDevice(_type.FcrDeviceType.Microphone);
|
|
597
|
+
}
|
|
598
|
+
}, {
|
|
599
|
+
key: "_handleMicrophoneVolumeIndicationUpdated",
|
|
600
|
+
value: function _handleMicrophoneVolumeIndicationUpdated(volume) {
|
|
601
|
+
this.microphoneVolumeLevel = volume;
|
|
602
|
+
}
|
|
603
|
+
}, {
|
|
604
|
+
key: "_handleMicrophoneStateUpdated",
|
|
605
|
+
value: function _handleMicrophoneStateUpdated(state) {
|
|
606
|
+
if (state === _fcrCore.FcrMediaSourceState.CLOSE) {
|
|
607
|
+
this.microphoneVolumeLevel = 0;
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
}]);
|
|
611
|
+
}();
|
|
612
|
+
_FcrDeviceStore = FcrDeviceStore;
|
|
613
|
+
var _applyDecs$e = _applyDecs(_FcrDeviceStore, [[_mobx.observable, 1, "_microphoneDeviceId"], [_mobx.observable, 1, "_speakerDeviceId"], [_mobx.observable, 1, "currentIsMirror"], [_mobx.observable, 1, "showForceOpenEffectDialog"], [_mobx.observable, 1, "cameraId"], [_mobx.observable, 1, "microphoneId"], [_mobx.observable, 1, "speakerId"], [_mobx.observable, 1, "cameraEnabled"], [_mobx.observable, 1, "showCameraPreview"], [_mobx.observable, 1, "microphoneEnabled"], [_mobx.observable, 1, "cameraList"], [_mobx.observable, 1, "microphoneList"], [_mobx.observable, 1, "microphoneVolumeLevel"], [_mobx.observable, 1, "speakerList"], [_mobx.observable, 1, "isLocalMirrorEnabled"], [_mobx.observable, 1, "isLocalEditBeautyOptions"], [_mobx.observable, 1, "speakerVolumeLevel"], [_mobx.observable, 1, "speakerVolume"], [_mobx.observable, 1, "microphoneVolume"], [_mobx.observable, 1, "currentVirtualBackgroundName"], [_mobx.observable, 1, "enableBeauty"], [_mobx.observable, 1, "currentBeautyKey"], [_mobx.observable, 1, "beautyOptions"], [_mobx.observable, 1, "microphoneDetecting"], [_mobx.observable, 1, "speakerDetecting"], [_mobx.observable, 1, "autoPlayFailedDialogShow"], [_mobx.computed, 3, "cameraDeviceList"], [_mobx.computed, 3, "microphoneDeviceList"], [_mobx.computed, 3, "speakerDeviceList"], [_setAutoPlayFailedDialogShowDecs, 18, "setAutoPlayFailedDialogShow"], [_startPlayLocalVideoDecs, 18, "startPlayLocalVideo"], [_stopPlayLocalVideoDecs, 18, "stopPlayLocalVideo"], [_decorator.bound, 2, "switchCamera"], [_setCurrentIsMirrorDecs, 18, "setCurrentIsMirror"], [_toggleLocalMirrorPreviewDecs, 18, "toggleLocalMirrorPreview"], [_setCameraEnabledDecs, 18, "setCameraEnabled"], [_setMicrophoneEnabledDecs, 18, "setMicrophoneEnabled"], [_toggleLocalMirrorDecs, 18, "toggleLocalMirror"], [_resetMirrorDecs, 18, "resetMirror"], [_setEditBeautyKeyDecs, 18, "setEditBeautyKey"], [_handleMicrophoneVolumeIndicationUpdatedDecs, 18, "_handleMicrophoneVolumeIndicationUpdated"], [_handleMicrophoneStateUpdatedDecs, 18, "_handleMicrophoneStateUpdated"]], []).e;
|
|
614
|
+
var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs$e, 27);
|
|
615
|
+
_init__microphoneDeviceId = _applyDecs$e2[0];
|
|
616
|
+
_init__speakerDeviceId = _applyDecs$e2[1];
|
|
617
|
+
_init_currentIsMirror = _applyDecs$e2[2];
|
|
618
|
+
_init_showForceOpenEffectDialog = _applyDecs$e2[3];
|
|
619
|
+
_init_cameraId = _applyDecs$e2[4];
|
|
620
|
+
_init_microphoneId = _applyDecs$e2[5];
|
|
621
|
+
_init_speakerId = _applyDecs$e2[6];
|
|
622
|
+
_init_cameraEnabled = _applyDecs$e2[7];
|
|
623
|
+
_init_showCameraPreview = _applyDecs$e2[8];
|
|
624
|
+
_init_microphoneEnabled = _applyDecs$e2[9];
|
|
625
|
+
_init_cameraList = _applyDecs$e2[10];
|
|
626
|
+
_init_microphoneList = _applyDecs$e2[11];
|
|
627
|
+
_init_microphoneVolumeLevel = _applyDecs$e2[12];
|
|
628
|
+
_init_speakerList = _applyDecs$e2[13];
|
|
629
|
+
_init_isLocalMirrorEnabled = _applyDecs$e2[14];
|
|
630
|
+
_init_isLocalEditBeautyOptions = _applyDecs$e2[15];
|
|
631
|
+
_init_speakerVolumeLevel = _applyDecs$e2[16];
|
|
632
|
+
_init_speakerVolume = _applyDecs$e2[17];
|
|
633
|
+
_init_microphoneVolume = _applyDecs$e2[18];
|
|
634
|
+
_init_currentVirtualBackgroundName = _applyDecs$e2[19];
|
|
635
|
+
_init_enableBeauty = _applyDecs$e2[20];
|
|
636
|
+
_init_currentBeautyKey = _applyDecs$e2[21];
|
|
637
|
+
_init_beautyOptions = _applyDecs$e2[22];
|
|
638
|
+
_init_microphoneDetecting = _applyDecs$e2[23];
|
|
639
|
+
_init_speakerDetecting = _applyDecs$e2[24];
|
|
640
|
+
_init_autoPlayFailedDialogShow = _applyDecs$e2[25];
|
|
641
|
+
_initProto = _applyDecs$e2[26];
|
|
642
|
+
_applyDecs$e;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FcrSecurityStore } from './security-store';
|
|
2
|
+
import { FcrDeviceStore } from './device-store';
|
|
3
|
+
import { FcrBaseRoomControl } from 'fcr-core/lib/room-control/type';
|
|
4
|
+
export declare class FcrDeviceStreamStore {
|
|
5
|
+
protected logger: import("agora-foundation/lib/logger").Logger;
|
|
6
|
+
private _roomControl;
|
|
7
|
+
private _deviceStore;
|
|
8
|
+
private _securityStore;
|
|
9
|
+
private get _localUser();
|
|
10
|
+
private get _localCameraStream();
|
|
11
|
+
get localAudioStream(): import("fcr-core/lib/type").FcrStreamInfo | undefined;
|
|
12
|
+
private get _canStartLocalVideo();
|
|
13
|
+
private get _canStartLocalAudio();
|
|
14
|
+
constructor({ roomControl, securityStore, deviceStore, }: {
|
|
15
|
+
roomControl: FcrBaseRoomControl;
|
|
16
|
+
securityStore: FcrSecurityStore;
|
|
17
|
+
deviceStore: FcrDeviceStore;
|
|
18
|
+
});
|
|
19
|
+
enableCameraWithStream(enable: boolean): Promise<void>;
|
|
20
|
+
enableMicrophoneWithStream(enable: boolean): Promise<void>;
|
|
21
|
+
private _setMicrophoneEnabled;
|
|
22
|
+
release(): void;
|
|
23
|
+
private _initLocalStream;
|
|
24
|
+
private _bindLocalAudioStream;
|
|
25
|
+
private _bindLocalVideoStream;
|
|
26
|
+
}
|