fcr-ui-scene 3.1.1 → 3.2.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/dist/132.js +2 -0
- package/dist/132.js.LICENSE.txt +311 -0
- package/dist/651.js +2 -0
- package/dist/651.js.LICENSE.txt +1 -0
- package/dist/73.js +1 -0
- package/dist/index.html +13 -0
- package/dist/main.da7c203ab32d15742cfe.css +11760 -0
- package/dist/main.js +2 -0
- package/dist/main.js.LICENSE.txt +254 -0
- package/dist/worker-entry.worker.js.LICENSE.txt +13 -0
- package/lib/base.d.ts +0 -1
- package/lib/base.js +16 -0
- package/lib/common/device-store.d.ts +3 -4
- package/lib/common/device-store.js +167 -83
- package/lib/common/device-stream-store.d.ts +3 -2
- package/lib/common/device-stream-store.js +94 -72
- package/lib/common/event-store.d.ts +3 -2
- package/lib/common/event-store.js +5 -0
- package/lib/common/security-store.d.ts +6 -16
- package/lib/common/security-store.js +136 -101
- package/lib/electron/app.js +13 -5
- package/lib/electron/injections.d.ts +3 -4
- package/lib/electron/injections.js +46 -30
- package/lib/electron/logger.d.ts +6 -0
- package/lib/electron/logger.js +66 -0
- package/lib/electron/main.js +24 -8
- package/lib/electron/preload.js +2 -1
- package/lib/electron/tools.js +9 -0
- package/lib/electron/window.d.ts +1 -1
- package/lib/electron/window.js +14 -2
- package/lib/fragments/control-bar/context.d.ts +0 -1
- package/lib/fragments/control-bar/control-bar-store.js +23 -2
- package/lib/fragments/control-bar/device/index.js +7 -0
- package/lib/fragments/control-bar/index.js +1 -1
- package/lib/fragments/control-bar/more-actions/index.js +5 -0
- package/lib/fragments/control-bar/security-content/index.js +3 -0
- package/lib/fragments/live-streaming/context.d.ts +0 -1
- package/lib/fragments/live-streaming/store.js +27 -17
- package/lib/fragments/share-screen-selection/context.d.ts +0 -1
- package/lib/fragments/share-screen-selection/selection-store.d.ts +0 -1
- package/lib/fragments/share-screen-selection/selection-store.js +34 -33
- package/lib/fragments/share-screen-selection/view.js +7 -0
- package/lib/fragments/toolbar/components/color-picker/components/color.js +2 -0
- package/lib/fragments/toolbar/components/color-picker/components/panel.js +4 -0
- package/lib/fragments/toolbar/components/color-picker/components/picker.js +2 -0
- package/lib/fragments/toolbar/components/color-picker/index.js +5 -1
- package/lib/fragments/toolbar/components/color-picker.js +3 -1
- package/lib/fragments/toolbar/components/eraser-picker.js +4 -13
- package/lib/fragments/toolbar/components/extension-toolbar-item.js +5 -0
- package/lib/fragments/toolbar/components/extra-tool-picker.js +4 -0
- package/lib/fragments/toolbar/components/pen-picker.js +2 -0
- package/lib/fragments/toolbar/components/screen-capture-picker.js +2 -0
- package/lib/fragments/toolbar/components/shape-picker.js +2 -0
- package/lib/fragments/toolbar/hooks.d.ts +1 -1
- package/lib/fragments/toolbar/hooks.js +13 -8
- package/lib/fragments/toolbar/store.d.ts +4 -4
- package/lib/fragments/toolbar/store.js +20 -2
- package/lib/fragments/toolbar/view.js +2 -0
- package/lib/global.d.ts +1 -0
- package/lib/hooks/meeting-time.d.ts +2 -2
- package/lib/modules/action-bar/action-bar-collapes-items.js +9 -0
- package/lib/modules/action-bar/chat/index.js +1 -1
- package/lib/modules/action-bar/context.d.ts +0 -1
- package/lib/modules/action-bar/device/index.d.ts +2 -2
- package/lib/modules/action-bar/device/index.js +2 -0
- package/lib/modules/action-bar/index.css +4 -0
- package/lib/modules/action-bar/index.d.ts +2 -2
- package/lib/modules/action-bar/index.dev.js +7 -6
- package/lib/modules/action-bar/item-placement.d.ts +1 -2
- package/lib/modules/action-bar/item.js +5 -0
- package/lib/modules/action-bar/leave/assign-host.d.ts +0 -1
- package/lib/modules/action-bar/leave/assign-host.js +5 -3
- package/lib/modules/action-bar/leave/index.js +6 -1
- package/lib/modules/action-bar/leave/leave-meeting.d.ts +0 -1
- package/lib/modules/action-bar/more/poppover-content.d.ts +0 -1
- package/lib/modules/action-bar/more/poppover-content.js +10 -0
- package/lib/modules/action-bar/screen-share/submenu.js +1 -0
- package/lib/modules/action-bar/security/drop-menu.js +34 -1
- package/lib/modules/action-bar/security/index.js +1 -1
- package/lib/modules/action-bar/settings/index.js +1 -1
- package/lib/modules/action-bar/store.d.ts +9 -17
- package/lib/modules/action-bar/store.js +67 -49
- package/lib/modules/audio-stream/index.js +12 -6
- package/lib/modules/chat/chat-bar/index.js +7 -0
- package/lib/modules/chat/chat-select/index.css +5 -0
- package/lib/modules/chat/chat-select/index.d.ts +0 -1
- package/lib/modules/chat/chat-select/index.js +29 -3
- package/lib/modules/chat/chat.d.ts +1 -1
- package/lib/modules/chat/chat.js +28 -4
- package/lib/modules/chat/contex.d.ts +0 -1
- package/lib/modules/chat/demo-wrapper.d.ts +0 -1
- package/lib/modules/chat/index.d.ts +3 -3
- package/lib/modules/chat/index.dev.js +3 -3
- package/lib/modules/chat/index.js +19 -3
- package/lib/modules/chat/message-list.js +24 -3
- package/lib/modules/chat/store.d.ts +3 -3
- package/lib/modules/chat/store.js +45 -79
- package/lib/modules/chat/util.js +1 -1
- package/lib/modules/connection-gateway/components/phone/components/callinfo/index.js +2 -0
- package/lib/modules/connection-gateway/components/phone/index.js +2 -0
- package/lib/modules/connection-gateway/index.d.ts +2 -2
- package/lib/modules/connection-gateway/index.js +2 -0
- package/lib/modules/connection-gateway/store.d.ts +1 -2
- package/lib/modules/connection-gateway/store.js +41 -14
- package/lib/modules/device-pretest/audio-preview/microphone-detection.d.ts +1 -0
- package/lib/modules/device-pretest/audio-preview/microphone-detection.js +3 -2
- package/lib/modules/device-pretest/audio-preview/speaker-control.d.ts +0 -1
- package/lib/modules/device-pretest/context.d.ts +0 -1
- package/lib/modules/device-pretest/index.d.ts +0 -1
- package/lib/modules/device-pretest/index.js +2 -1
- package/lib/modules/device-pretest/settings/beauty.js +2 -0
- package/lib/modules/device-pretest/settings/video-effect.d.ts +0 -1
- package/lib/modules/device-pretest/settings/video-settings-basic.js +1 -0
- package/lib/modules/device-pretest/settings/virtual-background-setting.js +2 -0
- package/lib/modules/device-pretest/store.js +28 -9
- package/lib/modules/dialog/components/chat/electron.js +1 -1
- package/lib/modules/dialog/components/chat/index.js +1 -1
- package/lib/modules/dialog/components/confirm/electron.js +2 -2
- package/lib/modules/dialog/components/confirm/index.js +16 -2
- package/lib/modules/dialog/components/connection-gateway/electron.js +1 -1
- package/lib/modules/dialog/components/device-setting/electron.d.ts +2 -0
- package/lib/modules/dialog/components/device-setting/electron.js +72 -0
- package/lib/modules/dialog/components/device-setting/index.css +27 -0
- package/lib/modules/dialog/components/device-setting/index.d.ts +4 -0
- package/lib/modules/dialog/components/device-setting/index.js +60 -0
- package/lib/modules/dialog/components/participant/electron.js +6 -1
- package/lib/modules/dialog/components/share-screen-selection/index.js +1 -1
- package/lib/modules/dialog/context.d.ts +0 -1
- package/lib/modules/dialog/dialogs.d.ts +0 -2
- package/lib/modules/dialog/dialogs.js +46 -91
- package/lib/modules/dialog/index.css +5 -6
- package/lib/modules/dialog/index.d.ts +1 -1
- package/lib/modules/dialog/index.js +17 -0
- package/lib/modules/dialog/store.d.ts +2 -2
- package/lib/modules/dialog/store.js +36 -7
- package/lib/modules/dialog/view.js +2 -0
- package/lib/modules/event-toast/context.d.ts +0 -1
- package/lib/modules/event-toast/store.js +16 -0
- package/lib/modules/invite/context.d.ts +0 -1
- package/lib/modules/invite/index.d.ts +2 -2
- package/lib/modules/invite/pstn-invite.js +3 -1
- package/lib/modules/invite/store.d.ts +2 -2
- package/lib/modules/invite/store.js +27 -7
- package/lib/modules/invite/voip-invite.d.ts +0 -1
- package/lib/modules/invite/voip-invite.js +1 -1
- package/lib/modules/layout/components/Aside.d.ts +0 -1
- package/lib/modules/layout/components/Aside.js +4 -1
- package/lib/modules/layout/components/Carousel.js +6 -5
- package/lib/modules/layout/components/Gallery.js +9 -8
- package/lib/modules/layout/components/index.css +11 -1
- package/lib/modules/layout/components/index.js +3 -0
- package/lib/modules/layout/context.d.ts +0 -1
- package/lib/modules/layout/index.dev.js +11 -11
- package/lib/modules/layout/index.js +0 -6
- package/lib/modules/layout/member-window/index.css +5 -5
- package/lib/modules/layout/member-window/index.d.ts +7 -7
- package/lib/modules/layout/member-window/index.js +50 -10
- package/lib/modules/layout/store.d.ts +44 -50
- package/lib/modules/layout/store.js +406 -338
- package/lib/modules/layout/type.d.ts +2 -1
- package/lib/modules/layout/video-window-datasource.d.ts +14 -8
- package/lib/modules/layout/video-window-datasource.js +129 -78
- package/lib/modules/live-streaming/context.d.ts +0 -1
- package/lib/modules/live-streaming/index.d.ts +2 -2
- package/lib/modules/live-streaming/index.dev.js +4 -3
- package/lib/modules/live-streaming/store.d.ts +2 -2
- package/lib/modules/live-streaming/store.js +32 -11
- package/lib/modules/participant/attendee/index.js +10 -0
- package/lib/modules/participant/attendee/participants-more-action.js +5 -2
- package/lib/modules/participant/context.d.ts +0 -1
- package/lib/modules/participant/index.d.ts +3 -3
- package/lib/modules/participant/index.dev.js +13 -11
- package/lib/modules/participant/member-list-data-source.d.ts +3 -3
- package/lib/modules/participant/member-list-data-source.js +29 -3
- package/lib/modules/participant/room-control-drop-menu/index.js +35 -1
- package/lib/modules/participant/store.d.ts +31 -31
- package/lib/modules/participant/store.js +203 -157
- package/lib/modules/participant/view.d.ts +6 -6
- package/lib/modules/participant/view.js +5 -0
- package/lib/modules/setting/audio-settings/audio-settings.js +16 -12
- package/lib/modules/setting/audio-settings/index.css +2 -2
- package/lib/modules/setting/context.d.ts +0 -1
- package/lib/modules/setting/general-settings/general-settings.js +2 -1
- package/lib/modules/setting/general-settings/index.css +2 -2
- package/lib/modules/setting/index.d.ts +2 -2
- package/lib/modules/setting/index.dev.js +13 -11
- package/lib/modules/setting/index.js +16 -0
- package/lib/modules/setting/minutes-settings/index.css +65 -0
- package/lib/modules/setting/minutes-settings/minutes-settings.d.ts +4 -0
- package/lib/modules/setting/minutes-settings/minutes-settings.js +159 -0
- package/lib/modules/setting/state/index.css +0 -4
- package/lib/modules/setting/state/index.js +11 -1
- package/lib/modules/setting/storage-settings/storage-settings.js +1 -1
- package/lib/modules/setting/store.d.ts +6 -4
- package/lib/modules/setting/store.js +68 -40
- package/lib/modules/setting/translate-settings/index.css +45 -0
- package/lib/modules/setting/translate-settings/language-select.d.ts +12 -0
- package/lib/modules/setting/translate-settings/language-select.js +50 -0
- package/lib/modules/setting/translate-settings/translate-settings.d.ts +4 -0
- package/lib/modules/setting/translate-settings/translate-settings.js +139 -0
- package/lib/modules/setting/video-settings/index.css +7 -1
- package/lib/modules/setting/video-settings/video-settings-basic.js +3 -2
- package/lib/modules/setting/video-settings/video-settings.js +5 -1
- package/lib/modules/setting/view.js +34 -2
- package/lib/modules/share-screen/index.d.ts +2 -2
- package/lib/modules/share-screen/index.dev.js +14 -12
- package/lib/modules/share-screen/index.js +2 -0
- package/lib/modules/share-screen/selection/index.js +44 -6
- package/lib/modules/share-screen/share-state-bar/index.css +49 -11
- package/lib/modules/share-screen/share-state-bar/index.d.ts +0 -1
- package/lib/modules/share-screen/share-state-bar/index.js +51 -20
- package/lib/modules/share-screen/store.d.ts +18 -11
- package/lib/modules/share-screen/store.js +656 -570
- package/lib/modules/state-bar/context.d.ts +0 -1
- package/lib/modules/state-bar/index.d.ts +1 -1
- package/lib/modules/state-bar/index.dev.js +11 -9
- package/lib/modules/state-bar/layout-config.js +2 -0
- package/lib/modules/state-bar/live-streaming-state.js +3 -0
- package/lib/modules/state-bar/recording.js +6 -6
- package/lib/modules/state-bar/store.d.ts +4 -4
- package/lib/modules/state-bar/store.js +50 -5
- package/lib/modules/state-bar/view.js +3 -2
- package/lib/modules/video-window/context.d.ts +0 -1
- package/lib/modules/video-window/deviceState/index.d.ts +3 -3
- package/lib/modules/video-window/members/index.js +7 -4
- package/lib/modules/video-window/store.d.ts +3 -2
- package/lib/modules/video-window/store.js +35 -6
- package/lib/modules/video-window/topControl/index.js +7 -0
- package/lib/modules/video-window/view.js +2 -0
- package/lib/modules/whiteboard/app.js +2 -2
- package/lib/modules/whiteboard/components/control-bar/store.d.ts +0 -1
- package/lib/modules/whiteboard/components/control-bar/store.js +29 -29
- package/lib/modules/whiteboard/components/loading/index.js +2 -2
- package/lib/modules/whiteboard/components/multi-window/index.js +2 -2
- package/lib/modules/whiteboard/components/pagination/store.d.ts +0 -1
- package/lib/modules/whiteboard/components/progress/electron.js +1 -1
- package/lib/modules/whiteboard/components/progress/style.css +4 -3
- package/lib/modules/whiteboard/components/switch-theme/index.js +9 -2
- package/lib/modules/whiteboard/components/switch-theme/item.js +2 -0
- package/lib/modules/whiteboard/components/switch-theme/libs.d.ts +2 -1
- package/lib/modules/whiteboard/components/switch-theme/libs.js +21 -20
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/panel.js +2 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/index.js +3 -1
- package/lib/modules/whiteboard/components/toolbar/components/eraser-picker.js +11 -9
- package/lib/modules/whiteboard/components/toolbar/components/extra-tool-picker.js +4 -0
- package/lib/modules/whiteboard/components/toolbar/components/move-handle.js +5 -0
- package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +2 -0
- package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +4 -2
- package/lib/modules/whiteboard/components/toolbar/hooks/index.d.ts +3 -3
- package/lib/modules/whiteboard/components/toolbar/hooks/index.js +16 -11
- package/lib/modules/whiteboard/components/toolbar/index.js +9 -0
- package/lib/modules/whiteboard/components/toolbar/store.d.ts +7 -7
- package/lib/modules/whiteboard/components/toolbar/store.js +22 -4
- package/lib/modules/whiteboard/context.d.ts +3 -3
- package/lib/modules/whiteboard/context.js +2 -2
- package/lib/modules/whiteboard/index.d.ts +6 -8
- package/lib/modules/whiteboard/index.js +292 -253
- package/lib/modules/whiteboard/type.d.ts +4 -12
- package/lib/modules/whiteboard/type.js +6 -16
- package/lib/modules/whiteboard/utils.d.ts +1 -0
- package/lib/modules/whiteboard/utils.js +12 -1
- package/lib/plugins/browser-runtime-plugin.js +2 -1
- package/lib/plugins/module-dev-plugin.js +4 -4
- package/lib/plugins/multi-lang-plugin.d.ts +1 -5
- package/lib/plugins/multi-lang-plugin.js +2 -0
- package/lib/runtime.d.ts +3 -5
- package/lib/translations/enUS.d.ts +148 -1
- package/lib/translations/enUS.js +156 -7
- package/lib/translations/zhCN.d.ts +148 -1
- package/lib/translations/zhCN.js +152 -3
- package/lib/ui-manager.d.ts +2 -2
- package/lib/ui-manager.js +37 -20
- package/lib/ui-scene.js +6 -1
- package/lib/utilities/board-context.d.ts +0 -1
- package/lib/utilities/constant.d.ts +4 -1
- package/lib/utilities/constant.js +3 -0
- package/lib/utilities/copyText.js +1 -1
- package/lib/utilities/extract.js +26 -3
- package/lib/utilities/hooks.js +2 -0
- package/lib/utilities/renderer-event.js +28 -0
- package/lib/utilities/renderer.js +9 -4
- package/lib/utilities/tools.js +5 -2
- package/lib/utilities/ui-resources.d.ts +2 -2
- package/lib/utilities/ui-resources.js +20 -3
- package/lib/utilities/video-track-render-context.d.ts +0 -1
- package/package.json +8 -7
|
@@ -13,6 +13,22 @@ require("core-js/modules/es.number.constructor.js");
|
|
|
13
13
|
require("core-js/modules/es.object.create.js");
|
|
14
14
|
require("core-js/modules/es.object.define-property.js");
|
|
15
15
|
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16
|
+
require("core-js/modules/esnext.function.metadata.js");
|
|
17
|
+
require("core-js/modules/esnext.map.delete-all.js");
|
|
18
|
+
require("core-js/modules/esnext.map.emplace.js");
|
|
19
|
+
require("core-js/modules/esnext.map.every.js");
|
|
20
|
+
require("core-js/modules/esnext.map.filter.js");
|
|
21
|
+
require("core-js/modules/esnext.map.find.js");
|
|
22
|
+
require("core-js/modules/esnext.map.find-key.js");
|
|
23
|
+
require("core-js/modules/esnext.map.includes.js");
|
|
24
|
+
require("core-js/modules/esnext.map.key-of.js");
|
|
25
|
+
require("core-js/modules/esnext.map.map-keys.js");
|
|
26
|
+
require("core-js/modules/esnext.map.map-values.js");
|
|
27
|
+
require("core-js/modules/esnext.map.merge.js");
|
|
28
|
+
require("core-js/modules/esnext.map.reduce.js");
|
|
29
|
+
require("core-js/modules/esnext.map.some.js");
|
|
30
|
+
require("core-js/modules/esnext.map.update.js");
|
|
31
|
+
require("core-js/modules/esnext.symbol.metadata.js");
|
|
16
32
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
17
33
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
18
34
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -37,6 +53,17 @@ require("core-js/modules/es.promise.finally.js");
|
|
|
37
53
|
require("core-js/modules/es.string.includes.js");
|
|
38
54
|
require("core-js/modules/es.string.iterator.js");
|
|
39
55
|
require("core-js/modules/es.weak-map.js");
|
|
56
|
+
require("core-js/modules/esnext.async-iterator.filter.js");
|
|
57
|
+
require("core-js/modules/esnext.async-iterator.find.js");
|
|
58
|
+
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
59
|
+
require("core-js/modules/esnext.async-iterator.some.js");
|
|
60
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
61
|
+
require("core-js/modules/esnext.iterator.filter.js");
|
|
62
|
+
require("core-js/modules/esnext.iterator.find.js");
|
|
63
|
+
require("core-js/modules/esnext.iterator.for-each.js");
|
|
64
|
+
require("core-js/modules/esnext.iterator.some.js");
|
|
65
|
+
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
66
|
+
require("core-js/modules/esnext.weak-map.emplace.js");
|
|
40
67
|
require("core-js/modules/web.dom-collections.for-each.js");
|
|
41
68
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
42
69
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
@@ -58,19 +85,18 @@ var _constant = require("../../utilities/constant");
|
|
|
58
85
|
var _rendererEvent = require("../../utilities/renderer-event");
|
|
59
86
|
var _platform = require("../../utilities/platform");
|
|
60
87
|
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
61
|
-
var _enums = require("agora-edu-core/lib/room-control/whiteboard-control/enums");
|
|
62
88
|
var _decorator = require("agora-foundation/lib/decorator");
|
|
63
89
|
var _type5 = require("../action-bar/type");
|
|
64
90
|
var _tools = require("../../utilities/tools");
|
|
65
91
|
var _react = require("react");
|
|
66
92
|
var _type6 = require("agora-ui-foundation/lib/components/icon/type");
|
|
67
93
|
var _icon = require("agora-ui-foundation/lib/components/icon");
|
|
68
|
-
var
|
|
94
|
+
var _types = require("agora-edu-core/lib/room-control/whiteboard-control/types");
|
|
69
95
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
70
96
|
var _ShareScreenStore;
|
|
71
|
-
var _initProto, _init__shareSelectionDialogId, _init__controlBarDialogId, _init__videoWindowDialogId, _init__isHost, _init__shareLocked, _init__screenTrack, _init__shareAudioTrack, _init__localUser, _init_screenSharingState, _init_applicationCaptureSources, _init_screenCaptureSources, _init_hasScreenCapturePermission, _init_showConfirm, _init_shareControlBarActive, _init_withAudio, _init_currentShareAudioProcessingChannel, _init_currentShareId, _init_sharerId, _init_currentShareType, _init_currentSelection, _init_currentSelectionType, _init_shareWithAudio, _init_boardOwnerUser, _init_localUser, _init_localUserRole, _init_title, _handleChooseScreenDecs, _init_handleChooseScreen, _setShareWithAudioStateDecs, _setShareAudioProcessingChannelDecs, _handleCheckScreenCapturePermissionDecs, _handleToSettingDecs,
|
|
72
|
-
function _classPrivateFieldInitSpec(
|
|
73
|
-
function _checkPrivateRedeclaration(
|
|
97
|
+
var _initProto, _init__shareSelectionDialogId, _init__controlBarDialogId, _init__videoWindowDialogId, _init__isHost, _init__shareLocked, _init__screenTrack, _init__shareAudioTrack, _init__localUser, _init_screenSharingState, _init_applicationCaptureSources, _init_screenCaptureSources, _init_hasScreenCapturePermission, _init_showConfirm, _init_shareControlBarActive, _init_withAudio, _init_currentShareAudioProcessingChannel, _init_currentShareId, _init_sharerId, _init_currentShareType, _init_currentSelection, _init_currentSelectionType, _init_shareWithAudio, _init_boardOwnerUser, _init_localUser, _init_localUserRole, _init_title, _init_localMicrophoneMute, _handleChooseScreenDecs, _init_handleChooseScreen, _setShareWithAudioStateDecs, _setShareAudioProcessingChannelDecs, _sendLocalAudioStateEventDecs, _handleCheckScreenCapturePermissionDecs, _handleToSettingDecs, _muteLocalAudioDecs, _muteLocalVideoDecs, _handleShareStartWithAudioDecs, _handleShareStopWithAudioDecs, _startPreviewDecs, _setShareControlBarActiveDecs, _setCurrentCameraIdDecs, _setCurrentSpeakerIdDecs, _setCurrentMicrophoneIdDecs, _setAllowChangeSelfNameDecs, _setAllowChatDecs, _setAllowJoinWithMuteAudioDecs, _setAllowShareScreenDecs, _setAllowUnmuteSelfVideoDecs, _setAllowUnmuteSelfAudioDecs, _setLockRoomEnabledDecs, _setWaitingRoomEnabledDecs, _openDialogDecs, _closeShareScreenSelectionDecs, _openControlBarDecs, _setControlBarWindowIdDecs, _openVideoWindowDialogDecs, _closeControlBarDecs, _closeVideoWindowDialogDecs, _setShareWithAudioDecs, _setWithAudioStateDecs, _handleShareScreenResourceDecs, _handleStartShareDecs, _handleReplaceScreenDecs, _handleStopShareDecs, _handleScreenCaptureStateUpdatedDecs, _updateCameraListDecs, _updateMicrophoneListDecs, _updateSpeakerListDecs, _handleLiveStreamingStateUpdatedDecs, _setShareLockDecs, _refreshLocalUserDecs, _ref;
|
|
98
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
99
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
74
100
|
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
75
101
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
76
102
|
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"); }
|
|
@@ -105,7 +131,8 @@ var _W = /*#__PURE__*/new WeakMap();
|
|
|
105
131
|
var _X = /*#__PURE__*/new WeakMap();
|
|
106
132
|
var _Y = /*#__PURE__*/new WeakMap();
|
|
107
133
|
var _Z = /*#__PURE__*/new WeakMap();
|
|
108
|
-
|
|
134
|
+
var _a = /*#__PURE__*/new WeakMap();
|
|
135
|
+
_ref = (_handleChooseScreenDecs = [_mobx.action, _mobx.action.bound], _setShareWithAudioStateDecs = [_mobx.action, _mobx.action.bound], _setShareAudioProcessingChannelDecs = [_mobx.action, _mobx.action.bound], _sendLocalAudioStateEventDecs = [_mobx.action, _mobx.action.bound], _handleCheckScreenCapturePermissionDecs = [_mobx.action, _mobx.action.bound], _handleToSettingDecs = [_mobx.action, _mobx.action.bound], _muteLocalAudioDecs = [_mobx.action, _mobx.action.bound], _muteLocalVideoDecs = [_mobx.action, _mobx.action.bound], _handleShareStartWithAudioDecs = [_mobx.action, _mobx.action.bound], _handleShareStopWithAudioDecs = [_mobx.action, _mobx.action.bound], _startPreviewDecs = [_mobx.action, _mobx.action.bound], _setShareControlBarActiveDecs = [_mobx.action, _mobx.action.bound], _setCurrentCameraIdDecs = [_mobx.action, _mobx.action.bound], _setCurrentSpeakerIdDecs = [_mobx.action, _mobx.action.bound], _setCurrentMicrophoneIdDecs = [_mobx.action, _mobx.action.bound], _setAllowChangeSelfNameDecs = [_mobx.action, _mobx.action.bound], _setAllowChatDecs = [_mobx.action, _mobx.action.bound], _setAllowJoinWithMuteAudioDecs = [_mobx.action, _mobx.action.bound], _setAllowShareScreenDecs = [_mobx.action, _mobx.action.bound], _setAllowUnmuteSelfVideoDecs = [_mobx.action, _mobx.action.bound], _setAllowUnmuteSelfAudioDecs = [_mobx.action, _mobx.action.bound], _setLockRoomEnabledDecs = [_mobx.action, _mobx.action.bound], _setWaitingRoomEnabledDecs = [_mobx.action, _mobx.action.bound], _openDialogDecs = [_mobx.action, _mobx.action.bound], _closeShareScreenSelectionDecs = [_mobx.action, _mobx.action.bound], _openControlBarDecs = [_mobx.action, _mobx.action.bound], _setControlBarWindowIdDecs = [_mobx.action, _mobx.action.bound], _openVideoWindowDialogDecs = [_mobx.action, _mobx.action.bound], _closeControlBarDecs = [_mobx.action, _mobx.action.bound], _closeVideoWindowDialogDecs = [_mobx.action, _mobx.action.bound], _setShareWithAudioDecs = [_mobx.action, _mobx.action.bound], _setWithAudioStateDecs = [_mobx.action, _mobx.action.bound], _handleShareScreenResourceDecs = [_mobx.action, _mobx.action.bound], _handleStartShareDecs = [_mobx.action, _mobx.action.bound], _handleReplaceScreenDecs = [_mobx.action, _mobx.action.bound], _handleStopShareDecs = [_mobx.action, _mobx.action.bound], _handleScreenCaptureStateUpdatedDecs = [_mobx.action, _mobx.action.bound], _updateCameraListDecs = [_mobx.action, _mobx.action.bound], _updateMicrophoneListDecs = [_mobx.action, _mobx.action.bound], _updateSpeakerListDecs = [_mobx.action, _mobx.action.bound], _handleLiveStreamingStateUpdatedDecs = [_mobx.action, _mobx.action.bound], _setShareLockDecs = [_mobx.action, _mobx.action.bound], _refreshLocalUserDecs = [_mobx.action, _mobx.action.bound], "logger");
|
|
109
136
|
var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
110
137
|
function ShareScreenStore(_ref2) {
|
|
111
138
|
var _this = this,
|
|
@@ -124,8 +151,10 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
124
151
|
(0, _defineProperty2["default"])(this, "_currentShareStreamId", '');
|
|
125
152
|
(0, _defineProperty2["default"])(this, "_connectType", _type5.ConnectType.NONE);
|
|
126
153
|
(0, _defineProperty2["default"])(this, "_removeScreenStreamFailed", false);
|
|
154
|
+
(0, _defineProperty2["default"])(this, "_isReplaceScreen", false);
|
|
155
|
+
(0, _defineProperty2["default"])(this, "_previewDom", null);
|
|
127
156
|
(0, _defineProperty2["default"])(this, "_observer", {
|
|
128
|
-
onScreenCaptureStateUpdated: this._handleScreenCaptureStateUpdated
|
|
157
|
+
onScreenCaptureStateUpdated: (0, _env.isElectron)() ? this._handleScreenCaptureStateUpdated : this._handleWebScreenCaptureStateUpdated
|
|
129
158
|
});
|
|
130
159
|
(0, _defineProperty2["default"])(this, "_deviceStoreObserver", {
|
|
131
160
|
onCameraListUpdated: this._updateCameraList,
|
|
@@ -136,11 +165,11 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
136
165
|
onLiveStreamingStateUpdated: this._handleLiveStreamingStateUpdated
|
|
137
166
|
});
|
|
138
167
|
(0, _defineProperty2["default"])(this, "_uiEventObserver", {
|
|
139
|
-
onEvent: this.
|
|
168
|
+
onEvent: this._onUiEvent.bind(this)
|
|
140
169
|
});
|
|
141
170
|
(0, _defineProperty2["default"])(this, "_streamObserver", {
|
|
142
171
|
onStreamsAdded: this._refreshLocalUser.bind(this),
|
|
143
|
-
onStreamsRemoved: this.
|
|
172
|
+
onStreamsRemoved: this._onStreamRemoved.bind(this),
|
|
144
173
|
onStreamsUpdated: this._refreshLocalUser.bind(this)
|
|
145
174
|
});
|
|
146
175
|
_classPrivateFieldInitSpec(this, _A, _init__shareSelectionDialogId(this, ''));
|
|
@@ -165,10 +194,11 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
165
194
|
_classPrivateFieldInitSpec(this, _T, _init_currentSelection(this, ''));
|
|
166
195
|
_classPrivateFieldInitSpec(this, _U, _init_currentSelectionType(this, _type2.AgoraRtcScreenCaptureType.WINDOW));
|
|
167
196
|
_classPrivateFieldInitSpec(this, _V, _init_shareWithAudio(this, false));
|
|
168
|
-
_classPrivateFieldInitSpec(this, _W, _init_boardOwnerUser(this,
|
|
197
|
+
_classPrivateFieldInitSpec(this, _W, _init_boardOwnerUser(this, undefined));
|
|
169
198
|
_classPrivateFieldInitSpec(this, _X, _init_localUser(this, null));
|
|
170
199
|
_classPrivateFieldInitSpec(this, _Y, _init_localUserRole(this, _type.FcrUserRole.PARTICIPANT));
|
|
171
200
|
_classPrivateFieldInitSpec(this, _Z, _init_title(this, 'Whiteboard'));
|
|
201
|
+
_classPrivateFieldInitSpec(this, _a, _init_localMicrophoneMute(this, false));
|
|
172
202
|
(0, _defineProperty2["default"])(this, "handleChooseScreen", _init_handleChooseScreen(this, function (id) {
|
|
173
203
|
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _type2.AgoraRtcScreenCaptureType.WINDOW;
|
|
174
204
|
_this.currentSelection = id;
|
|
@@ -178,8 +208,6 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
178
208
|
this._mediaControl = mediaControl;
|
|
179
209
|
this._streamControl = roomControl.getStreamControl();
|
|
180
210
|
this._userControl = roomControl.getUserControl();
|
|
181
|
-
this.handleShareScreenResource = this.handleShareScreenResource.bind(this);
|
|
182
|
-
this.handleStopShare = this.handleStopShare.bind(this);
|
|
183
211
|
this._deviceStore = deviceStore;
|
|
184
212
|
this._deviceStreamStore = deviceStreamStore;
|
|
185
213
|
this._securityStore = securityStore;
|
|
@@ -201,9 +229,15 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
201
229
|
});
|
|
202
230
|
}
|
|
203
231
|
});
|
|
204
|
-
this._roomControl.
|
|
205
|
-
|
|
206
|
-
|
|
232
|
+
this._roomControl.getBoardControl().addObserver({
|
|
233
|
+
onActive: function onActive(ownerId) {
|
|
234
|
+
_this.handleStopShare();
|
|
235
|
+
(0, _env.isElectron)() && _this._closeCapture();
|
|
236
|
+
_this.closeShareScreenSelection();
|
|
237
|
+
_this.boardOwnerUser = _this._userControl.getUser(ownerId);
|
|
238
|
+
},
|
|
239
|
+
onInactive: function onInactive(reason) {
|
|
240
|
+
_this.boardOwnerUser = undefined;
|
|
207
241
|
}
|
|
208
242
|
});
|
|
209
243
|
this._refreshLocalUser();
|
|
@@ -421,6 +455,14 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
421
455
|
set: function set(v) {
|
|
422
456
|
_classPrivateFieldSet(_Z, this, v);
|
|
423
457
|
}
|
|
458
|
+
}, {
|
|
459
|
+
key: "localMicrophoneMute",
|
|
460
|
+
get: function get() {
|
|
461
|
+
return _classPrivateFieldGet(_a, this);
|
|
462
|
+
},
|
|
463
|
+
set: function set(v) {
|
|
464
|
+
_classPrivateFieldSet(_a, this, v);
|
|
465
|
+
}
|
|
424
466
|
}, {
|
|
425
467
|
key: "localVideoState",
|
|
426
468
|
get: function get() {
|
|
@@ -454,6 +496,12 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
454
496
|
value: function handlerBoardShareStop() {
|
|
455
497
|
this._uiEventStore.sendEvent(_constant.UIAction.CLOSE_WHITEBOARD);
|
|
456
498
|
}
|
|
499
|
+
}, {
|
|
500
|
+
key: "sendLocalAudioStateEvent",
|
|
501
|
+
value: function sendLocalAudioStateEvent() {
|
|
502
|
+
this.muteLocalAudio(false);
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
457
505
|
}, {
|
|
458
506
|
key: "release",
|
|
459
507
|
value: function release() {
|
|
@@ -475,55 +523,10 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
475
523
|
value: function handleToSetting() {
|
|
476
524
|
this.showConfirm = false;
|
|
477
525
|
}
|
|
478
|
-
}, {
|
|
479
|
-
key: "setShareWithAudio",
|
|
480
|
-
value: function setShareWithAudio(withAudio) {
|
|
481
|
-
var _this2 = this;
|
|
482
|
-
var confirmAudioShareWhileMicOff = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
483
|
-
this.withAudio = withAudio;
|
|
484
|
-
if (confirmAudioShareWhileMicOff && withAudio && !this.localAudioState) {
|
|
485
|
-
var dialogKey = this._uiEventStore.openConfirmDialog({
|
|
486
|
-
title: (0, _i18n.transI18n)('fmt_screenshare_tips_share_audio_micon'),
|
|
487
|
-
content: (0, _i18n.transI18n)('fmt_screenshare_tips_share_audio_turnonmic'),
|
|
488
|
-
cancelText: (0, _i18n.transI18n)('fmt_screenshare_button_giveup_shareaudio'),
|
|
489
|
-
okText: (0, _i18n.transI18n)('fmt_screenshare_button_confirm_shareaudio'),
|
|
490
|
-
cancelButtonProps: {
|
|
491
|
-
type: 'gray',
|
|
492
|
-
shape: 'rounded'
|
|
493
|
-
},
|
|
494
|
-
okButtonProps: {
|
|
495
|
-
type: 'primary',
|
|
496
|
-
shape: 'rounded'
|
|
497
|
-
},
|
|
498
|
-
closeIcon: null,
|
|
499
|
-
closable: false,
|
|
500
|
-
onOk: function onOk() {
|
|
501
|
-
// 开启麦克风
|
|
502
|
-
_this2.muteLocalAudio(false);
|
|
503
|
-
_this2.setShareWithAudio(withAudio, false);
|
|
504
|
-
_this2._uiEventStore.closeDialog(dialogKey);
|
|
505
|
-
},
|
|
506
|
-
onCancel: function onCancel() {
|
|
507
|
-
(0, _rendererEvent.sendEvent)({
|
|
508
|
-
action: _constant.RendererEventAction.SET_SHARE_WITH_AUDIO_CONTROL_BAR,
|
|
509
|
-
payload: {
|
|
510
|
-
withAudio: false
|
|
511
|
-
}
|
|
512
|
-
});
|
|
513
|
-
_this2._uiEventStore.closeDialog(dialogKey);
|
|
514
|
-
}
|
|
515
|
-
});
|
|
516
|
-
return;
|
|
517
|
-
}
|
|
518
|
-
this._streamControl.updatePublishPrivilegeOfStreams((0, _defineProperty2["default"])({}, this._currentShareStreamId, {
|
|
519
|
-
audioPrivilege: withAudio ? _type.FcrStreamPrivilegeOperation.HAS_PRIVILEGE : _type.FcrStreamPrivilegeOperation.NOPRIVILEGE,
|
|
520
|
-
videoPrivilege: _type.FcrStreamPrivilegeOperation.NOOPERATION
|
|
521
|
-
}));
|
|
522
|
-
}
|
|
523
526
|
}, {
|
|
524
527
|
key: "muteLocalAudio",
|
|
525
528
|
value: function () {
|
|
526
|
-
var _muteLocalAudio = (0, _asyncToGenerator2["default"])(
|
|
529
|
+
var _muteLocalAudio = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(mute, confirmAudioShareWhileMicOff) {
|
|
527
530
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
528
531
|
while (1) switch (_context.prev = _context.next) {
|
|
529
532
|
case 0:
|
|
@@ -543,7 +546,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
543
546
|
}, {
|
|
544
547
|
key: "muteLocalVideo",
|
|
545
548
|
value: function () {
|
|
546
|
-
var _muteLocalVideo = (0, _asyncToGenerator2["default"])(
|
|
549
|
+
var _muteLocalVideo = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(mute) {
|
|
547
550
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
548
551
|
while (1) switch (_context2.prev = _context2.next) {
|
|
549
552
|
case 0:
|
|
@@ -561,78 +564,209 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
561
564
|
return muteLocalVideo;
|
|
562
565
|
}()
|
|
563
566
|
}, {
|
|
564
|
-
key: "
|
|
565
|
-
value: function () {
|
|
566
|
-
var
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
_context3.t0 = event;
|
|
571
|
-
_context3.next = _context3.t0 === _constant.UIAction.START_SHARE_SCREEN ? 3 : _context3.t0 === _constant.UIAction.STOP_SHARE_SCREEN ? 5 : _context3.t0 === _constant.UIAction.SHOW_TOAST ? 7 : _context3.t0 === _constant.UIAction.STOP_SCREEN_CAPTURE ? 9 : _context3.t0 === _constant.UIAction.ENGINE_RECONNECTED ? 11 : _context3.t0 === _constant.UIAction.WHITEBOARD_CHANGED ? 13 : 15;
|
|
572
|
-
break;
|
|
573
|
-
case 3:
|
|
574
|
-
this.handleShareScreenResource();
|
|
575
|
-
return _context3.abrupt("break", 15);
|
|
576
|
-
case 5:
|
|
577
|
-
this.handleStopShare();
|
|
578
|
-
return _context3.abrupt("break", 15);
|
|
579
|
-
case 7:
|
|
580
|
-
if ((0, _env.isElectron)() && this.shareControlBarActive) {
|
|
581
|
-
(0, _rendererEvent.sendEvent)({
|
|
582
|
-
action: _constant.RendererEventAction.SHOW_TOAST,
|
|
583
|
-
payload: params
|
|
584
|
-
});
|
|
585
|
-
}
|
|
586
|
-
return _context3.abrupt("break", 15);
|
|
587
|
-
case 9:
|
|
588
|
-
this._closeCapture();
|
|
589
|
-
return _context3.abrupt("break", 15);
|
|
590
|
-
case 11:
|
|
591
|
-
if (this._removeScreenStreamFailed) {
|
|
592
|
-
this._removeScreenStream();
|
|
593
|
-
this._removeScreenStreamFailed = false;
|
|
594
|
-
}
|
|
595
|
-
return _context3.abrupt("break", 15);
|
|
596
|
-
case 13:
|
|
597
|
-
if (params.action === _type7.WhiteboardBaseEvents.SET_OWNER_USER_ID) {
|
|
598
|
-
this.boardOwnerUser = this._userControl.getUser(params.payload);
|
|
599
|
-
}
|
|
600
|
-
return _context3.abrupt("break", 15);
|
|
601
|
-
case 15:
|
|
602
|
-
case "end":
|
|
603
|
-
return _context3.stop();
|
|
604
|
-
}
|
|
605
|
-
}, _callee3, this);
|
|
606
|
-
}));
|
|
607
|
-
function onUiEvent(_x4, _x5) {
|
|
608
|
-
return _onUiEvent.apply(this, arguments);
|
|
567
|
+
key: "handleShareStartWithAudio",
|
|
568
|
+
value: function handleShareStartWithAudio() {
|
|
569
|
+
var isMac = navigator.userAgent.indexOf('Mac') > -1;
|
|
570
|
+
this._shareAudioTrack = this._mediaControl.getLoopbackTrack(isMac ? 'BlackHole 2ch' : '');
|
|
571
|
+
if (this._mediaControl.isCapabilitySupported(_agoraEduCore.FcrCapability.CAPTURING_LOOPBACK)) {
|
|
572
|
+
this._shareAudioTrack.start();
|
|
609
573
|
}
|
|
610
|
-
|
|
611
|
-
|
|
574
|
+
}
|
|
575
|
+
}, {
|
|
576
|
+
key: "handleShareStopWithAudio",
|
|
577
|
+
value: function handleShareStopWithAudio() {
|
|
578
|
+
if (!this._shareAudioTrack) {
|
|
579
|
+
return;
|
|
580
|
+
}
|
|
581
|
+
if (this._mediaControl.isCapabilitySupported(_agoraEduCore.FcrCapability.CAPTURING_LOOPBACK)) {
|
|
582
|
+
this._shareAudioTrack.stop();
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
}, {
|
|
586
|
+
key: "startPreview",
|
|
587
|
+
value: function startPreview(dom) {
|
|
588
|
+
this._previewDom = dom;
|
|
589
|
+
if (dom) {
|
|
590
|
+
var _this$_screenTrack;
|
|
591
|
+
(_this$_screenTrack = this._screenTrack) === null || _this$_screenTrack === void 0 || _this$_screenTrack.startPreview({
|
|
592
|
+
renderMode: 1,
|
|
593
|
+
isMirror: false
|
|
594
|
+
}, dom);
|
|
595
|
+
} else {
|
|
596
|
+
var _this$_screenTrack2;
|
|
597
|
+
(_this$_screenTrack2 = this._screenTrack) === null || _this$_screenTrack2 === void 0 || _this$_screenTrack2.stopPreview(dom);
|
|
598
|
+
this._previewDom = null;
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
}, {
|
|
602
|
+
key: "setShareControlBarActive",
|
|
603
|
+
value: function setShareControlBarActive(active) {
|
|
604
|
+
this.shareControlBarActive = active;
|
|
605
|
+
}
|
|
606
|
+
}, {
|
|
607
|
+
key: "setCurrentCameraId",
|
|
608
|
+
value: function setCurrentCameraId(deviceId) {
|
|
609
|
+
this._deviceStore.setCameraId(deviceId);
|
|
610
|
+
}
|
|
611
|
+
}, {
|
|
612
|
+
key: "setCurrentSpeakerId",
|
|
613
|
+
value: function setCurrentSpeakerId(deviceId) {
|
|
614
|
+
this._deviceStore.setSpeakerId(deviceId);
|
|
615
|
+
}
|
|
616
|
+
}, {
|
|
617
|
+
key: "setCurrentMicrophoneId",
|
|
618
|
+
value: function setCurrentMicrophoneId(deviceId) {
|
|
619
|
+
this._deviceStore.setMicrophoneId(deviceId);
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
// security
|
|
623
|
+
}, {
|
|
624
|
+
key: "setAllowChangeSelfName",
|
|
625
|
+
value: function setAllowChangeSelfName(allow) {
|
|
626
|
+
this._securityStore.setAllowChangeSelfName();
|
|
627
|
+
}
|
|
628
|
+
}, {
|
|
629
|
+
key: "setAllowChat",
|
|
630
|
+
value: function setAllowChat(allow) {
|
|
631
|
+
this._securityStore.setAllowChat(allow);
|
|
632
|
+
}
|
|
633
|
+
}, {
|
|
634
|
+
key: "setAllowJoinWithMuteAudio",
|
|
635
|
+
value: function setAllowJoinWithMuteAudio(allow) {
|
|
636
|
+
this._securityStore.setAllowJoinWithMuteAudio(allow);
|
|
637
|
+
}
|
|
638
|
+
}, {
|
|
639
|
+
key: "setAllowShareScreen",
|
|
640
|
+
value: function setAllowShareScreen(allow) {
|
|
641
|
+
this._securityStore.setAllowShareScreen(allow);
|
|
642
|
+
}
|
|
643
|
+
}, {
|
|
644
|
+
key: "setAllowUnmuteSelfVideo",
|
|
645
|
+
value: function setAllowUnmuteSelfVideo(allow) {
|
|
646
|
+
this._securityStore.setAllowUnmuteSelfVideo(allow);
|
|
647
|
+
}
|
|
648
|
+
}, {
|
|
649
|
+
key: "setAllowUnmuteSelfAudio",
|
|
650
|
+
value: function setAllowUnmuteSelfAudio(allow) {
|
|
651
|
+
this._securityStore.setAllowUnmuteSelfAudio(allow);
|
|
652
|
+
}
|
|
653
|
+
}, {
|
|
654
|
+
key: "setLockRoomEnabled",
|
|
655
|
+
value: function setLockRoomEnabled(lock) {
|
|
656
|
+
this._securityStore.setLockRoomEnabled(lock);
|
|
657
|
+
}
|
|
658
|
+
}, {
|
|
659
|
+
key: "setWaitingRoomEnabled",
|
|
660
|
+
value: function setWaitingRoomEnabled(allow) {
|
|
661
|
+
this._securityStore.setWaitingRoomEnabled();
|
|
662
|
+
}
|
|
663
|
+
}, {
|
|
664
|
+
key: "openDialog",
|
|
665
|
+
value: function openDialog(item) {
|
|
666
|
+
this._uiEventStore.openDialog(item, '', {
|
|
667
|
+
controlBarWindowId: this._controlBarWindowId
|
|
668
|
+
});
|
|
669
|
+
}
|
|
670
|
+
}, {
|
|
671
|
+
key: "closeDialog",
|
|
672
|
+
value: function closeDialog(item) {
|
|
673
|
+
this._uiEventStore.closeDialog("".concat(item, "_").concat(item));
|
|
674
|
+
}
|
|
675
|
+
}, {
|
|
676
|
+
key: "openLiveStreamingDialog",
|
|
677
|
+
value: function openLiveStreamingDialog() {
|
|
678
|
+
this._uiEventStore.openLiveStreamingDialog();
|
|
679
|
+
}
|
|
680
|
+
}, {
|
|
681
|
+
key: "closeShareScreenSelection",
|
|
682
|
+
value: function closeShareScreenSelection() {
|
|
683
|
+
this._uiEventStore.closeDialog(this._shareSelectionDialogId);
|
|
684
|
+
this._shareSelectionDialogId = '';
|
|
685
|
+
}
|
|
686
|
+
}, {
|
|
687
|
+
key: "openControlBar",
|
|
688
|
+
value: function openControlBar() {
|
|
689
|
+
this._controlBarDialogId = this._uiEventStore.openDialog(_constant.DialogKey.CONTROL_BAR);
|
|
690
|
+
}
|
|
691
|
+
}, {
|
|
692
|
+
key: "setControlBarWindowId",
|
|
693
|
+
value: function setControlBarWindowId(id) {
|
|
694
|
+
this._controlBarWindowId = id;
|
|
695
|
+
}
|
|
696
|
+
}, {
|
|
697
|
+
key: "openVideoWindowDialog",
|
|
698
|
+
value: function openVideoWindowDialog() {
|
|
699
|
+
this._videoWindowDialogId = this._uiEventStore.openDialog(_constant.DialogKey.VIDEO_WINDOW);
|
|
700
|
+
}
|
|
701
|
+
}, {
|
|
702
|
+
key: "closeControlBar",
|
|
703
|
+
value: function closeControlBar() {
|
|
704
|
+
if (!this._controlBarDialogId) return;
|
|
705
|
+
this.setControlBarWindowId(-1);
|
|
706
|
+
this._uiEventStore.closeDialog(this._controlBarDialogId);
|
|
707
|
+
this._controlBarDialogId = '';
|
|
708
|
+
}
|
|
709
|
+
}, {
|
|
710
|
+
key: "closeVideoWindowDialog",
|
|
711
|
+
value: function closeVideoWindowDialog() {
|
|
712
|
+
this._uiEventStore.closeDialog(this._videoWindowDialogId);
|
|
713
|
+
this._videoWindowDialogId = '';
|
|
714
|
+
}
|
|
715
|
+
}, {
|
|
716
|
+
key: "setShareWithAudio",
|
|
717
|
+
value: function setShareWithAudio(withAudio) {
|
|
718
|
+
var _this2 = this;
|
|
719
|
+
var confirmAudioShareWhileMicOff = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
720
|
+
var dialogKey = !this.localAudioState && withAudio && this._uiEventStore.openConfirmDialog({
|
|
721
|
+
title: (0, _i18n.transI18n)('fmt_screenshare_tips_share_audio_micon'),
|
|
722
|
+
content: (0, _i18n.transI18n)('fmt_screenshare_tips_share_audio_turnonmic'),
|
|
723
|
+
onOk: function onOk() {
|
|
724
|
+
_this2._deviceStore.setMicrophoneEnabled(true);
|
|
725
|
+
_this2._setWithAudioState(withAudio);
|
|
726
|
+
dialogKey && _this2._uiEventStore.closeDialog(dialogKey);
|
|
727
|
+
},
|
|
728
|
+
onCancel: function onCancel() {
|
|
729
|
+
dialogKey && _this2._uiEventStore.closeDialog(dialogKey);
|
|
730
|
+
},
|
|
731
|
+
okText: (0, _i18n.transI18n)('fmt_screenshare_continue_share')
|
|
732
|
+
});
|
|
733
|
+
if (dialogKey) return;
|
|
734
|
+
this._setWithAudioState(withAudio);
|
|
735
|
+
}
|
|
736
|
+
}, {
|
|
737
|
+
key: "_setWithAudioState",
|
|
738
|
+
value: function _setWithAudioState(withAudio) {
|
|
739
|
+
this.withAudio = withAudio;
|
|
740
|
+
this._streamControl.updatePublishPrivilegeOfStreams((0, _defineProperty2["default"])({}, this._currentShareStreamId, {
|
|
741
|
+
audioPrivilege: withAudio ? _agoraEduCore.FcrStreamPrivilegeOperation.HAS_PRIVILEGE : _agoraEduCore.FcrStreamPrivilegeOperation.NOPRIVILEGE,
|
|
742
|
+
videoPrivilege: _agoraEduCore.FcrStreamPrivilegeOperation.NOOPERATION
|
|
743
|
+
}));
|
|
744
|
+
}
|
|
612
745
|
}, {
|
|
613
746
|
key: "handleShareScreenResource",
|
|
614
747
|
value: function () {
|
|
615
|
-
var _handleShareScreenResource = (0, _asyncToGenerator2["default"])(
|
|
748
|
+
var _handleShareScreenResource = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
|
616
749
|
var windowList, displayList, NORMAL_HEIGHT, WINDOWS_HEIGHT, NORMAL_WIDTH, shareSelectionHeight, _window$runtime$brows, mainWidowX, mainWindowY, mainWidth, mainHeight, offsetForToast;
|
|
617
|
-
return _regenerator["default"].wrap(function
|
|
618
|
-
while (1) switch (
|
|
750
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
751
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
619
752
|
case 0:
|
|
620
753
|
this._removeReactions();
|
|
621
754
|
this.showConfirm = false;
|
|
622
|
-
|
|
623
|
-
|
|
755
|
+
this._addReactions();
|
|
756
|
+
if (!(this._mediaControl.isCapabilitySupported(_agoraEduCore.FcrCapability.ENUMERATING_SCREEN) && (0, _env.isElectron)())) {
|
|
757
|
+
_context3.next = 20;
|
|
624
758
|
break;
|
|
625
759
|
}
|
|
626
|
-
|
|
760
|
+
_context3.next = 6;
|
|
627
761
|
return this._mediaControl.getWindowList();
|
|
628
|
-
case
|
|
629
|
-
windowList =
|
|
762
|
+
case 6:
|
|
763
|
+
windowList = _context3.sent.filter(function (item) {
|
|
630
764
|
return item.title !== 'AgoraHighLighter' || item.isCurrent;
|
|
631
765
|
});
|
|
632
|
-
|
|
766
|
+
_context3.next = 9;
|
|
633
767
|
return this._mediaControl.getDisplayList();
|
|
634
|
-
case
|
|
635
|
-
displayList =
|
|
768
|
+
case 9:
|
|
769
|
+
displayList = _context3.sent;
|
|
636
770
|
this.applicationCaptureSources = windowList.filter(function (item) {
|
|
637
771
|
return !item.isCurrent;
|
|
638
772
|
});
|
|
@@ -653,7 +787,6 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
653
787
|
shareSelectionHeight = !(0, _platform.isWindows)() ? NORMAL_HEIGHT : NORMAL_HEIGHT + WINDOWS_HEIGHT;
|
|
654
788
|
_window$runtime$brows = window.runtime.browserWindow.getBounds(), mainWidowX = _window$runtime$brows.x, mainWindowY = _window$runtime$brows.y, mainWidth = _window$runtime$brows.width, mainHeight = _window$runtime$brows.height;
|
|
655
789
|
offsetForToast = 50;
|
|
656
|
-
this._addReactions();
|
|
657
790
|
this._shareSelectionDialogId = this._uiEventStore.openDialog(_constant.DialogKey.SHARE_SCREEN, 'screen-selection', {
|
|
658
791
|
frame: false,
|
|
659
792
|
titleBarStyle: 'hidden',
|
|
@@ -665,14 +798,14 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
665
798
|
y: mainWindowY + Math.floor(mainHeight / 2) - Math.floor(shareSelectionHeight / 2) + offsetForToast,
|
|
666
799
|
controlBarDialogId: this._controlBarDialogId
|
|
667
800
|
});
|
|
668
|
-
return
|
|
801
|
+
return _context3.abrupt("return");
|
|
669
802
|
case 20:
|
|
670
803
|
this.handleStartShare();
|
|
671
804
|
case 21:
|
|
672
805
|
case "end":
|
|
673
|
-
return
|
|
806
|
+
return _context3.stop();
|
|
674
807
|
}
|
|
675
|
-
},
|
|
808
|
+
}, _callee3, this);
|
|
676
809
|
}));
|
|
677
810
|
function handleShareScreenResource() {
|
|
678
811
|
return _handleShareScreenResource.apply(this, arguments);
|
|
@@ -682,225 +815,178 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
682
815
|
}, {
|
|
683
816
|
key: "handleStartShare",
|
|
684
817
|
value: function () {
|
|
685
|
-
var _handleStartShare = (0, _asyncToGenerator2["default"])(
|
|
686
|
-
var _this3 = this;
|
|
818
|
+
var _handleStartShare = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4() {
|
|
687
819
|
var id,
|
|
688
820
|
type,
|
|
689
821
|
withAudio,
|
|
690
822
|
audioProcessingChannel,
|
|
823
|
+
excludeWindows,
|
|
691
824
|
_this$_localUser4,
|
|
692
825
|
_this$_localUser5,
|
|
693
|
-
res,
|
|
694
|
-
streamUuid,
|
|
695
826
|
screenTrack,
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
while (1) switch (_context5.prev = _context5.next) {
|
|
827
|
+
_args4 = arguments;
|
|
828
|
+
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
829
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
700
830
|
case 0:
|
|
701
|
-
id =
|
|
702
|
-
type =
|
|
703
|
-
withAudio =
|
|
704
|
-
audioProcessingChannel =
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
});
|
|
831
|
+
id = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : 'default';
|
|
832
|
+
type = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : _type2.AgoraRtcScreenCaptureType.DISPLAY;
|
|
833
|
+
withAudio = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : false;
|
|
834
|
+
audioProcessingChannel = _args4.length > 3 && _args4[3] !== undefined ? _args4[3] : _shareAudio.AudioProcessingChannel.MONO;
|
|
835
|
+
excludeWindows = [];
|
|
836
|
+
withAudio = (0, _env.isElectron)() ? withAudio : true; // electron 取 withAudio,web 默认为 true
|
|
837
|
+
if ((0, _env.isElectron)()) this.closeShareScreenSelection();
|
|
709
838
|
if (!(id.split('-')[0] === 'whiteboard')) {
|
|
710
|
-
|
|
839
|
+
_context4.next = 12;
|
|
711
840
|
break;
|
|
712
841
|
}
|
|
713
842
|
if (!(!this._securityStore.hasStartBoardPermission() && !((_this$_localUser4 = this._localUser) !== null && _this$_localUser4 !== void 0 && _this$_localUser4.isHost) && !((_this$_localUser5 = this._localUser) !== null && _this$_localUser5 !== void 0 && _this$_localUser5.isCoHost))) {
|
|
714
|
-
|
|
843
|
+
_context4.next = 10;
|
|
715
844
|
break;
|
|
716
845
|
}
|
|
717
|
-
return
|
|
718
|
-
case 8:
|
|
719
|
-
this._uiEventStore.sendEvent(_constant.UIAction.OPEN_WHITEBOARD);
|
|
720
|
-
return _context5.abrupt("return");
|
|
846
|
+
return _context4.abrupt("return", this._showToast((0, _i18n.transI18n)('fmt_screenshare_tips_hostprohibits'), 'error'));
|
|
721
847
|
case 10:
|
|
722
|
-
|
|
723
|
-
|
|
848
|
+
this._uiEventStore.sendEvent(_constant.UIAction.OPEN_WHITEBOARD);
|
|
849
|
+
return _context4.abrupt("return");
|
|
850
|
+
case 12:
|
|
851
|
+
if (!(this.screenSharingState === _agoraEduCore.FcrMediaSourceState.STARTED)) {
|
|
852
|
+
_context4.next = 16;
|
|
853
|
+
break;
|
|
724
854
|
}
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
855
|
+
this.handleReplaceScreen(id, type, withAudio, audioProcessingChannel);
|
|
856
|
+
this._setShareLock(false);
|
|
857
|
+
return _context4.abrupt("return");
|
|
858
|
+
case 16:
|
|
859
|
+
this._uiEventStore.sendEvent(_constant.UIAction.SET_CURRENT_SHARE_SCREEN, {
|
|
860
|
+
id: id,
|
|
861
|
+
type: type
|
|
862
|
+
});
|
|
863
|
+
_context4.t0 = this._mediaControl.isCapabilitySupported(_agoraEduCore.FcrCapability.ENUMERATING_SCREEN);
|
|
864
|
+
if (!_context4.t0) {
|
|
865
|
+
_context4.next = 22;
|
|
728
866
|
break;
|
|
729
867
|
}
|
|
730
|
-
|
|
868
|
+
_context4.next = 21;
|
|
731
869
|
return this._validateShareStart(id, type);
|
|
732
|
-
case
|
|
733
|
-
|
|
734
|
-
case
|
|
735
|
-
if (!
|
|
736
|
-
|
|
870
|
+
case 21:
|
|
871
|
+
_context4.t0 = !_context4.sent;
|
|
872
|
+
case 22:
|
|
873
|
+
if (!_context4.t0) {
|
|
874
|
+
_context4.next = 24;
|
|
737
875
|
break;
|
|
738
876
|
}
|
|
739
|
-
return
|
|
740
|
-
case
|
|
877
|
+
return _context4.abrupt("return");
|
|
878
|
+
case 24:
|
|
741
879
|
if (!this._shareLocked) {
|
|
742
|
-
|
|
880
|
+
_context4.next = 26;
|
|
743
881
|
break;
|
|
744
882
|
}
|
|
745
|
-
this._showToast((0, _i18n.transI18n)('fmt_screenshare_tips_enablecollection'), 'error');
|
|
746
|
-
|
|
747
|
-
case 21:
|
|
883
|
+
return _context4.abrupt("return", this._showToast((0, _i18n.transI18n)('fmt_screenshare_tips_enablecollection'), 'error'));
|
|
884
|
+
case 26:
|
|
748
885
|
this._setShareLock(true);
|
|
749
886
|
this.currentShareId = id;
|
|
750
887
|
this.currentShareType = type;
|
|
751
888
|
this.withAudio = withAudio;
|
|
752
|
-
|
|
753
|
-
// if (!this._hasScreenSharePermission() || !(await this._checkScreenSharingPreemption())) {
|
|
889
|
+
if (withAudio) this.handleShareStartWithAudio();
|
|
754
890
|
if (this._hasScreenSharePermission()) {
|
|
755
|
-
|
|
756
|
-
break;
|
|
757
|
-
}
|
|
758
|
-
this._setShareLock(false);
|
|
759
|
-
return _context5.abrupt("return");
|
|
760
|
-
case 28:
|
|
761
|
-
if (!(this.screenSharingState === _agoraEduCore.FcrMediaSourceState.STARTED)) {
|
|
762
|
-
_context5.next = 32;
|
|
891
|
+
_context4.next = 34;
|
|
763
892
|
break;
|
|
764
893
|
}
|
|
765
|
-
this.handleReplaceScreen(id, type, withAudio, audioProcessingChannel);
|
|
766
894
|
this._setShareLock(false);
|
|
767
|
-
return
|
|
768
|
-
case
|
|
769
|
-
this.
|
|
770
|
-
_context5.next = 35;
|
|
771
|
-
return this._streamControl.createScreenStream({
|
|
772
|
-
streamType: withAudio ? _type3.AgoraRteMediaStreamType.BOTH : _type3.AgoraRteMediaStreamType.VIDEO
|
|
773
|
-
})["finally"](function () {
|
|
774
|
-
_this3._setShareLock(false);
|
|
775
|
-
});
|
|
776
|
-
case 35:
|
|
777
|
-
res = _context5.sent;
|
|
778
|
-
streamUuid = res.data.streamUuid;
|
|
779
|
-
this.logger.debug('performance: createScreenStream end ', new Date().getTime());
|
|
780
|
-
this._currentShareStreamId = streamUuid;
|
|
781
|
-
if (withAudio) {
|
|
782
|
-
this.handleShareStartWithAudio();
|
|
783
|
-
}
|
|
784
|
-
screenTrack = this._mediaControl.getScreenVideoTrack(id);
|
|
785
|
-
this._screenTrack = screenTrack;
|
|
786
|
-
excludeWindows = [];
|
|
895
|
+
return _context4.abrupt("return");
|
|
896
|
+
case 34:
|
|
897
|
+
this.openControlBar();
|
|
787
898
|
if (!(0, _env.isElectron)()) {
|
|
788
|
-
|
|
899
|
+
_context4.next = 43;
|
|
789
900
|
break;
|
|
790
901
|
}
|
|
902
|
+
_context4.next = 38;
|
|
903
|
+
return this._createScreenStream();
|
|
904
|
+
case 38:
|
|
791
905
|
window.runtime.browserWindow.setFullScreen(false);
|
|
792
|
-
this.logger.debug('performance: open control bar ', new Date().getTime());
|
|
793
|
-
this.openControlBar();
|
|
794
906
|
this.openVideoWindowDialog();
|
|
795
|
-
|
|
907
|
+
_context4.next = 42;
|
|
796
908
|
return this._getExcludeWindows();
|
|
797
|
-
case
|
|
798
|
-
excludeWindows =
|
|
799
|
-
case
|
|
909
|
+
case 42:
|
|
910
|
+
excludeWindows = _context4.sent;
|
|
911
|
+
case 43:
|
|
912
|
+
screenTrack = this._mediaControl.getScreenTrack(id);
|
|
913
|
+
this._screenTrack = screenTrack;
|
|
800
914
|
screenTrack.addObserver(this._observer);
|
|
801
915
|
screenTrack.start(type, {
|
|
802
916
|
// preview: true,
|
|
803
917
|
withAudio: withAudio,
|
|
804
918
|
excludeWindows: excludeWindows
|
|
805
919
|
});
|
|
806
|
-
case
|
|
920
|
+
case 47:
|
|
807
921
|
case "end":
|
|
808
|
-
return
|
|
922
|
+
return _context4.stop();
|
|
809
923
|
}
|
|
810
|
-
},
|
|
924
|
+
}, _callee4, this);
|
|
811
925
|
}));
|
|
812
926
|
function handleStartShare() {
|
|
813
927
|
return _handleStartShare.apply(this, arguments);
|
|
814
928
|
}
|
|
815
929
|
return handleStartShare;
|
|
816
930
|
}()
|
|
817
|
-
}, {
|
|
818
|
-
key: "handleShareStartWithAudio",
|
|
819
|
-
value: function handleShareStartWithAudio() {
|
|
820
|
-
var isMac = navigator.userAgent.indexOf('Mac') > -1;
|
|
821
|
-
this._shareAudioTrack = this._mediaControl.getLoopbackAudioTrack(isMac ? 'BlackHole 2ch' : '');
|
|
822
|
-
if (this._mediaControl.isCapabilitySupported(_agoraEduCore.FcrCapability.CAPTURING_LOOPBACK)) {
|
|
823
|
-
this._shareAudioTrack.start();
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
}, {
|
|
827
|
-
key: "handleShareStopWithAudio",
|
|
828
|
-
value: function handleShareStopWithAudio() {
|
|
829
|
-
if (!this._shareAudioTrack) {
|
|
830
|
-
return;
|
|
831
|
-
}
|
|
832
|
-
if (this._mediaControl.isCapabilitySupported(_agoraEduCore.FcrCapability.CAPTURING_LOOPBACK)) {
|
|
833
|
-
this._shareAudioTrack.stop();
|
|
834
|
-
}
|
|
835
|
-
}
|
|
836
|
-
}, {
|
|
837
|
-
key: "handleStopShare",
|
|
838
|
-
value: function handleStopShare() {
|
|
839
|
-
var _this$_screenTrack, _this$_screenTrack2;
|
|
840
|
-
this._closeCapture();
|
|
841
|
-
this._removeScreenStream();
|
|
842
|
-
(_this$_screenTrack = this._screenTrack) === null || _this$_screenTrack === void 0 || _this$_screenTrack.stopPreview();
|
|
843
|
-
(_this$_screenTrack2 = this._screenTrack) === null || _this$_screenTrack2 === void 0 || _this$_screenTrack2.stop();
|
|
844
|
-
this.currentShareId = '';
|
|
845
|
-
this._removeReactions();
|
|
846
|
-
}
|
|
847
931
|
}, {
|
|
848
932
|
key: "handleReplaceScreen",
|
|
849
933
|
value: function handleReplaceScreen() {
|
|
850
|
-
var
|
|
934
|
+
var _this3 = this;
|
|
851
935
|
var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'default';
|
|
852
936
|
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _type2.AgoraRtcScreenCaptureType.WINDOW;
|
|
853
937
|
var withAudio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
854
938
|
var audioProcessingChannel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _shareAudio.AudioProcessingChannel.MONO;
|
|
939
|
+
withAudio = (0, _env.isElectron)() ? withAudio : true; // electron 取 withAudio,web 默认为 true
|
|
855
940
|
if (this.withAudio && !withAudio) {
|
|
856
941
|
this.handleShareStopWithAudio();
|
|
857
942
|
}
|
|
858
943
|
this.withAudio = withAudio;
|
|
859
944
|
var screenTrack = this._screenTrack;
|
|
945
|
+
this._isReplaceScreen = true;
|
|
860
946
|
if (screenTrack) {
|
|
861
947
|
var observer = {
|
|
862
948
|
onScreenCaptureStateUpdated: function () {
|
|
863
|
-
var _onScreenCaptureStateUpdated = (0, _asyncToGenerator2["default"])(
|
|
949
|
+
var _onScreenCaptureStateUpdated = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5(sourceId, state) {
|
|
864
950
|
var newScreenTrack, excludeWindows;
|
|
865
|
-
return _regenerator["default"].wrap(function
|
|
866
|
-
while (1) switch (
|
|
951
|
+
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
952
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
867
953
|
case 0:
|
|
868
954
|
if (!(state === _agoraEduCore.FcrMediaSourceState.STOPPED)) {
|
|
869
|
-
|
|
955
|
+
_context5.next = 17;
|
|
870
956
|
break;
|
|
871
957
|
}
|
|
872
|
-
screenTrack.removeObserver(
|
|
958
|
+
screenTrack.removeObserver(_this3._observer);
|
|
873
959
|
screenTrack.removeObserver(observer);
|
|
874
|
-
newScreenTrack =
|
|
960
|
+
newScreenTrack = _this3._mediaControl.getScreenTrack(id);
|
|
875
961
|
if (withAudio) {
|
|
876
|
-
|
|
962
|
+
_this3.handleShareStartWithAudio();
|
|
877
963
|
}
|
|
878
|
-
|
|
964
|
+
_this3._screenTrack = newScreenTrack;
|
|
879
965
|
excludeWindows = [];
|
|
880
966
|
if (!(0, _env.isElectron)()) {
|
|
881
|
-
|
|
967
|
+
_context5.next = 11;
|
|
882
968
|
break;
|
|
883
969
|
}
|
|
884
|
-
|
|
885
|
-
return
|
|
970
|
+
_context5.next = 10;
|
|
971
|
+
return _this3._getExcludeWindows();
|
|
886
972
|
case 10:
|
|
887
|
-
excludeWindows =
|
|
973
|
+
excludeWindows = _context5.sent;
|
|
888
974
|
case 11:
|
|
889
|
-
newScreenTrack.addObserver(
|
|
975
|
+
newScreenTrack.addObserver(_this3._observer);
|
|
890
976
|
newScreenTrack.start(type, {
|
|
891
977
|
// preview: true,
|
|
892
978
|
withAudio: withAudio,
|
|
893
979
|
excludeWindows: excludeWindows
|
|
894
980
|
});
|
|
895
|
-
if (
|
|
896
|
-
|
|
897
|
-
streamId:
|
|
981
|
+
if (_this3._currentShareStreamId) {
|
|
982
|
+
_this3._streamControl.bindLocalStreams([{
|
|
983
|
+
streamId: _this3._currentShareStreamId,
|
|
898
984
|
audioSourceId: 'default',
|
|
899
985
|
videoSourceId: id
|
|
900
986
|
}]);
|
|
901
987
|
}
|
|
902
|
-
|
|
903
|
-
|
|
988
|
+
_this3.currentShareId = id;
|
|
989
|
+
_this3.currentShareType = type;
|
|
904
990
|
(0, _rendererEvent.sendEvent)({
|
|
905
991
|
action: _constant.RendererEventAction.START_SHARE_SCREEN,
|
|
906
992
|
payload: {
|
|
@@ -911,11 +997,11 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
911
997
|
});
|
|
912
998
|
case 17:
|
|
913
999
|
case "end":
|
|
914
|
-
return
|
|
1000
|
+
return _context5.stop();
|
|
915
1001
|
}
|
|
916
|
-
},
|
|
1002
|
+
}, _callee5);
|
|
917
1003
|
}));
|
|
918
|
-
function onScreenCaptureStateUpdated(
|
|
1004
|
+
function onScreenCaptureStateUpdated(_x4, _x5) {
|
|
919
1005
|
return _onScreenCaptureStateUpdated.apply(this, arguments);
|
|
920
1006
|
}
|
|
921
1007
|
return onScreenCaptureStateUpdated;
|
|
@@ -923,163 +1009,112 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
923
1009
|
};
|
|
924
1010
|
screenTrack.addObserver(observer);
|
|
925
1011
|
screenTrack.stop();
|
|
926
|
-
screenTrack.stopPreview();
|
|
1012
|
+
this._previewDom && screenTrack.stopPreview(this._previewDom);
|
|
927
1013
|
}
|
|
928
1014
|
}
|
|
929
1015
|
}, {
|
|
930
|
-
key: "
|
|
931
|
-
value: function
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
var _this$_screenTrack4;
|
|
940
|
-
(_this$_screenTrack4 = this._screenTrack) === null || _this$_screenTrack4 === void 0 || _this$_screenTrack4.stopPreview();
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
}, {
|
|
944
|
-
key: "setShareControlBarActive",
|
|
945
|
-
value: function setShareControlBarActive(active) {
|
|
946
|
-
this.shareControlBarActive = active;
|
|
947
|
-
}
|
|
948
|
-
}, {
|
|
949
|
-
key: "setCurrentCameraId",
|
|
950
|
-
value: function setCurrentCameraId(deviceId) {
|
|
951
|
-
this._deviceStore.setCameraId(deviceId);
|
|
952
|
-
}
|
|
953
|
-
}, {
|
|
954
|
-
key: "setCurrentSpeakerId",
|
|
955
|
-
value: function setCurrentSpeakerId(deviceId) {
|
|
956
|
-
this._deviceStore.setSpeakerId(deviceId);
|
|
957
|
-
}
|
|
958
|
-
}, {
|
|
959
|
-
key: "setCurrentMicrophoneId",
|
|
960
|
-
value: function setCurrentMicrophoneId(deviceId) {
|
|
961
|
-
this._deviceStore.setMicrophoneId(deviceId);
|
|
962
|
-
}
|
|
963
|
-
|
|
964
|
-
// security
|
|
965
|
-
}, {
|
|
966
|
-
key: "setAllowChangeSelfName",
|
|
967
|
-
value: function setAllowChangeSelfName(allow) {
|
|
968
|
-
this._securityStore.setAllowChangeSelfName();
|
|
969
|
-
}
|
|
970
|
-
}, {
|
|
971
|
-
key: "setAllowChat",
|
|
972
|
-
value: function setAllowChat(allow) {
|
|
973
|
-
this._securityStore.setAllowChat(allow);
|
|
974
|
-
}
|
|
975
|
-
}, {
|
|
976
|
-
key: "setAllowJoinWithMuteAudio",
|
|
977
|
-
value: function setAllowJoinWithMuteAudio(allow) {
|
|
978
|
-
this._securityStore.setAllowJoinWithMuteAudio(allow);
|
|
979
|
-
}
|
|
980
|
-
}, {
|
|
981
|
-
key: "setAllowShareScreen",
|
|
982
|
-
value: function setAllowShareScreen(allow) {
|
|
983
|
-
this._securityStore.setAllowShareScreen(allow);
|
|
984
|
-
}
|
|
985
|
-
}, {
|
|
986
|
-
key: "setAllowUnmuteSelfVideo",
|
|
987
|
-
value: function setAllowUnmuteSelfVideo(allow) {
|
|
988
|
-
this._securityStore.setAllowUnmuteSelfVideo(allow);
|
|
989
|
-
}
|
|
990
|
-
}, {
|
|
991
|
-
key: "setAllowUnmuteSelfAudio",
|
|
992
|
-
value: function setAllowUnmuteSelfAudio(allow) {
|
|
993
|
-
this._securityStore.setAllowUnmuteSelfAudio(allow);
|
|
994
|
-
}
|
|
995
|
-
}, {
|
|
996
|
-
key: "setLockRoomEnabled",
|
|
997
|
-
value: function setLockRoomEnabled(lock) {
|
|
998
|
-
this._securityStore.setLockRoomEnabled(lock);
|
|
999
|
-
}
|
|
1000
|
-
}, {
|
|
1001
|
-
key: "setWaitingRoomEnabled",
|
|
1002
|
-
value: function setWaitingRoomEnabled(allow) {
|
|
1003
|
-
this._securityStore.setWaitingRoomEnabled();
|
|
1004
|
-
}
|
|
1005
|
-
}, {
|
|
1006
|
-
key: "openDialog",
|
|
1007
|
-
value: function openDialog(item) {
|
|
1008
|
-
this._uiEventStore.openDialog(item, '', {
|
|
1009
|
-
controlBarWindowId: this._controlBarWindowId
|
|
1010
|
-
});
|
|
1011
|
-
}
|
|
1012
|
-
}, {
|
|
1013
|
-
key: "closeDialog",
|
|
1014
|
-
value: function closeDialog(item) {
|
|
1015
|
-
this._uiEventStore.closeDialog("".concat(item, "_").concat(item));
|
|
1016
|
-
}
|
|
1017
|
-
}, {
|
|
1018
|
-
key: "openLiveStreamingDialog",
|
|
1019
|
-
value: function openLiveStreamingDialog() {
|
|
1020
|
-
this._uiEventStore.openLiveStreamingDialog();
|
|
1021
|
-
}
|
|
1022
|
-
}, {
|
|
1023
|
-
key: "closeShareScreenSelection",
|
|
1024
|
-
value: function closeShareScreenSelection() {
|
|
1025
|
-
this._uiEventStore.closeDialog(this._shareSelectionDialogId);
|
|
1026
|
-
this._shareSelectionDialogId = '';
|
|
1027
|
-
}
|
|
1028
|
-
}, {
|
|
1029
|
-
key: "openControlBar",
|
|
1030
|
-
value: function openControlBar() {
|
|
1031
|
-
this._controlBarDialogId = this._uiEventStore.openDialog(_constant.DialogKey.CONTROL_BAR);
|
|
1032
|
-
}
|
|
1033
|
-
}, {
|
|
1034
|
-
key: "setControlBarWindowId",
|
|
1035
|
-
value: function setControlBarWindowId(id) {
|
|
1036
|
-
this._controlBarWindowId = id;
|
|
1037
|
-
}
|
|
1038
|
-
}, {
|
|
1039
|
-
key: "openVideoWindowDialog",
|
|
1040
|
-
value: function openVideoWindowDialog() {
|
|
1041
|
-
this._videoWindowDialogId = this._uiEventStore.openDialog(_constant.DialogKey.VIDEO_WINDOW);
|
|
1016
|
+
key: "handleStopShare",
|
|
1017
|
+
value: function handleStopShare() {
|
|
1018
|
+
var _this$_screenTrack3, _this$_screenTrack4;
|
|
1019
|
+
this._closeCapture();
|
|
1020
|
+
this._removeScreenStream();
|
|
1021
|
+
this._previewDom && ((_this$_screenTrack3 = this._screenTrack) === null || _this$_screenTrack3 === void 0 ? void 0 : _this$_screenTrack3.stopPreview(this._previewDom));
|
|
1022
|
+
(_this$_screenTrack4 = this._screenTrack) === null || _this$_screenTrack4 === void 0 || _this$_screenTrack4.stop();
|
|
1023
|
+
this.currentShareId = '';
|
|
1024
|
+
this._removeReactions();
|
|
1042
1025
|
}
|
|
1043
1026
|
}, {
|
|
1044
|
-
key: "
|
|
1045
|
-
value: function
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1027
|
+
key: "_createScreenStream",
|
|
1028
|
+
value: function () {
|
|
1029
|
+
var _createScreenStream2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6() {
|
|
1030
|
+
var _this4 = this;
|
|
1031
|
+
var streamType, streamId;
|
|
1032
|
+
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
|
1033
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
1034
|
+
case 0:
|
|
1035
|
+
this.logger.debug('performance: createScreenStream ', new Date().getTime());
|
|
1036
|
+
streamType = this.withAudio ? _type3.AgoraRteMediaStreamType.BOTH : _type3.AgoraRteMediaStreamType.VIDEO;
|
|
1037
|
+
_context6.next = 4;
|
|
1038
|
+
return this._streamControl.addLocalScreenStream({
|
|
1039
|
+
streamType: streamType
|
|
1040
|
+
})["finally"](function () {
|
|
1041
|
+
_this4._setShareLock(false);
|
|
1042
|
+
});
|
|
1043
|
+
case 4:
|
|
1044
|
+
streamId = _context6.sent;
|
|
1045
|
+
this.logger.debug('performance: createScreenStream end ', new Date().getTime());
|
|
1046
|
+
this._currentShareStreamId = streamId;
|
|
1047
|
+
case 7:
|
|
1048
|
+
case "end":
|
|
1049
|
+
return _context6.stop();
|
|
1050
|
+
}
|
|
1051
|
+
}, _callee6, this);
|
|
1052
|
+
}));
|
|
1053
|
+
function _createScreenStream() {
|
|
1054
|
+
return _createScreenStream2.apply(this, arguments);
|
|
1055
|
+
}
|
|
1056
|
+
return _createScreenStream;
|
|
1057
|
+
}()
|
|
1050
1058
|
}, {
|
|
1051
|
-
key: "
|
|
1052
|
-
value: function
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1059
|
+
key: "_handleWebScreenCaptureStateUpdated",
|
|
1060
|
+
value: function () {
|
|
1061
|
+
var _handleWebScreenCaptureStateUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7(sourceId, state) {
|
|
1062
|
+
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
|
1063
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
1064
|
+
case 0:
|
|
1065
|
+
this.screenSharingState = state;
|
|
1066
|
+
if (state === _agoraEduCore.FcrMediaSourceState.STARTED) {
|
|
1067
|
+
this._setShareLock(true);
|
|
1068
|
+
this._createScreenStream();
|
|
1069
|
+
this._isReplaceScreen = false;
|
|
1070
|
+
}
|
|
1071
|
+
if (state === _agoraEduCore.FcrMediaSourceState.STOPPED) {
|
|
1072
|
+
this._setShareLock(false);
|
|
1073
|
+
!this._isReplaceScreen && this.handleStopShare();
|
|
1074
|
+
this._isReplaceScreen = false;
|
|
1075
|
+
}
|
|
1076
|
+
if (state === _agoraEduCore.FcrMediaSourceState.ERROR) {
|
|
1077
|
+
this._setShareLock(false);
|
|
1078
|
+
this._isReplaceScreen = false;
|
|
1079
|
+
}
|
|
1080
|
+
case 4:
|
|
1081
|
+
case "end":
|
|
1082
|
+
return _context7.stop();
|
|
1083
|
+
}
|
|
1084
|
+
}, _callee7, this);
|
|
1085
|
+
}));
|
|
1086
|
+
function _handleWebScreenCaptureStateUpdated(_x6, _x7) {
|
|
1087
|
+
return _handleWebScreenCaptureStateUpdated2.apply(this, arguments);
|
|
1088
|
+
}
|
|
1089
|
+
return _handleWebScreenCaptureStateUpdated;
|
|
1090
|
+
}()
|
|
1056
1091
|
}, {
|
|
1057
1092
|
key: "_handleScreenCaptureStateUpdated",
|
|
1058
1093
|
value: function () {
|
|
1059
|
-
var _handleScreenCaptureStateUpdated2 = (0, _asyncToGenerator2["default"])(
|
|
1094
|
+
var _handleScreenCaptureStateUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee8(sourceId, state) {
|
|
1060
1095
|
var _this$_screenTrack5, _this$_screenTrack6, _this$_screenTrack7;
|
|
1061
|
-
return _regenerator["default"].wrap(function
|
|
1062
|
-
while (1) switch (
|
|
1096
|
+
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
|
1097
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
1063
1098
|
case 0:
|
|
1064
1099
|
if (state === _agoraEduCore.FcrMediaSourceState.STOPPED) {
|
|
1065
|
-
(_this$_screenTrack5 = this._screenTrack) === null || _this$_screenTrack5 === void 0
|
|
1100
|
+
this._previewDom && ((_this$_screenTrack5 = this._screenTrack) === null || _this$_screenTrack5 === void 0 ? void 0 : _this$_screenTrack5.stopPreview(this._previewDom));
|
|
1066
1101
|
(_this$_screenTrack6 = this._screenTrack) === null || _this$_screenTrack6 === void 0 || _this$_screenTrack6.removeObserver(this._observer);
|
|
1067
1102
|
(_this$_screenTrack7 = this._screenTrack) === null || _this$_screenTrack7 === void 0 || _this$_screenTrack7.stop();
|
|
1068
1103
|
}
|
|
1069
1104
|
if (!(state === _agoraEduCore.FcrMediaSourceState.ERROR)) {
|
|
1070
|
-
|
|
1105
|
+
_context8.next = 5;
|
|
1071
1106
|
break;
|
|
1072
1107
|
}
|
|
1073
1108
|
this.handleStopShare();
|
|
1074
1109
|
this.screenSharingState = _agoraEduCore.FcrMediaSourceState.STOPPED;
|
|
1075
|
-
return
|
|
1110
|
+
return _context8.abrupt("return");
|
|
1076
1111
|
case 5:
|
|
1077
1112
|
this.screenSharingState = state;
|
|
1078
1113
|
case 6:
|
|
1079
1114
|
case "end":
|
|
1080
|
-
return
|
|
1115
|
+
return _context8.stop();
|
|
1081
1116
|
}
|
|
1082
|
-
},
|
|
1117
|
+
}, _callee8, this);
|
|
1083
1118
|
}));
|
|
1084
1119
|
function _handleScreenCaptureStateUpdated(_x8, _x9) {
|
|
1085
1120
|
return _handleScreenCaptureStateUpdated2.apply(this, arguments);
|
|
@@ -1133,9 +1168,9 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1133
1168
|
(0, _rendererEvent.sendEvent)({
|
|
1134
1169
|
action: _constant.RendererEventAction.CHANGE_LIVE_STREAMING_INFO,
|
|
1135
1170
|
payload: {
|
|
1136
|
-
videoSteamingUrl: liveStreamingConfig.pushStreamingUrl,
|
|
1137
|
-
videoStreamingKey: liveStreamingConfig.pushStreamingKey,
|
|
1138
|
-
playUrl: liveStreamingConfig.pullStreamingUrl
|
|
1171
|
+
videoSteamingUrl: liveStreamingConfig === null || liveStreamingConfig === void 0 ? void 0 : liveStreamingConfig.pushStreamingUrl,
|
|
1172
|
+
videoStreamingKey: liveStreamingConfig === null || liveStreamingConfig === void 0 ? void 0 : liveStreamingConfig.pushStreamingKey,
|
|
1173
|
+
playUrl: liveStreamingConfig === null || liveStreamingConfig === void 0 ? void 0 : liveStreamingConfig.pullStreamingUrl
|
|
1139
1174
|
}
|
|
1140
1175
|
});
|
|
1141
1176
|
}
|
|
@@ -1156,35 +1191,35 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1156
1191
|
}, {
|
|
1157
1192
|
key: "_removeScreenStream",
|
|
1158
1193
|
value: function () {
|
|
1159
|
-
var _removeScreenStream2 = (0, _asyncToGenerator2["default"])(
|
|
1160
|
-
var streamId;
|
|
1161
|
-
return _regenerator["default"].wrap(function
|
|
1162
|
-
while (1) switch (
|
|
1194
|
+
var _removeScreenStream2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee9() {
|
|
1195
|
+
var streamId, _this$_streamControl;
|
|
1196
|
+
return _regenerator["default"].wrap(function _callee9$(_context9) {
|
|
1197
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
1163
1198
|
case 0:
|
|
1164
1199
|
streamId = this._currentShareStreamId;
|
|
1165
1200
|
if (streamId) {
|
|
1166
|
-
|
|
1201
|
+
_context9.next = 3;
|
|
1167
1202
|
break;
|
|
1168
1203
|
}
|
|
1169
|
-
return
|
|
1204
|
+
return _context9.abrupt("return");
|
|
1170
1205
|
case 3:
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
return this._streamControl.removeScreenStream();
|
|
1206
|
+
_context9.prev = 3;
|
|
1207
|
+
_context9.next = 6;
|
|
1208
|
+
return (_this$_streamControl = this._streamControl) === null || _this$_streamControl === void 0 ? void 0 : _this$_streamControl.removeScreenStream();
|
|
1174
1209
|
case 6:
|
|
1175
1210
|
this._currentShareStreamId = '';
|
|
1176
|
-
|
|
1211
|
+
_context9.next = 13;
|
|
1177
1212
|
break;
|
|
1178
1213
|
case 9:
|
|
1179
|
-
|
|
1180
|
-
|
|
1214
|
+
_context9.prev = 9;
|
|
1215
|
+
_context9.t0 = _context9["catch"](3);
|
|
1181
1216
|
this._removeScreenStreamFailed = true;
|
|
1182
|
-
this.logger.error('removeScreenStream error',
|
|
1217
|
+
this.logger.error('removeScreenStream error', _context9.t0);
|
|
1183
1218
|
case 13:
|
|
1184
1219
|
case "end":
|
|
1185
|
-
return
|
|
1220
|
+
return _context9.stop();
|
|
1186
1221
|
}
|
|
1187
|
-
},
|
|
1222
|
+
}, _callee9, this, [[3, 9]]);
|
|
1188
1223
|
}));
|
|
1189
1224
|
function _removeScreenStream() {
|
|
1190
1225
|
return _removeScreenStream2.apply(this, arguments);
|
|
@@ -1207,28 +1242,31 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1207
1242
|
}, {
|
|
1208
1243
|
key: "_refreshLocalUser",
|
|
1209
1244
|
value: function _refreshLocalUser(_, events) {
|
|
1210
|
-
var _isReplaced$operatorU, _this$_localUser6
|
|
1245
|
+
var _isReplaced$operatorU, _this$_localUser6;
|
|
1211
1246
|
var isReplaced = events && events.find(function (event) {
|
|
1212
1247
|
var _event$cause;
|
|
1213
|
-
return ((_event$cause = event.cause) === null || _event$cause === void 0 || (_event$cause = _event$cause.data) === null || _event$cause === void 0 ? void 0 : _event$cause.reason) ===
|
|
1248
|
+
return ((_event$cause = event.cause) === null || _event$cause === void 0 || (_event$cause = _event$cause.data) === null || _event$cause === void 0 ? void 0 : _event$cause.reason) === _types.FcrBoardInactiveReason.SEIZE;
|
|
1214
1249
|
});
|
|
1215
1250
|
if (isReplaced && ((_isReplaced$operatorU = isReplaced.operatorUser) === null || _isReplaced$operatorU === void 0 ? void 0 : _isReplaced$operatorU.userId) !== ((_this$_localUser6 = this._localUser) === null || _this$_localUser6 === void 0 ? void 0 : _this$_localUser6.userId)) {
|
|
1216
1251
|
this._currentShareStreamId = '';
|
|
1217
1252
|
}
|
|
1218
|
-
var
|
|
1219
|
-
|
|
1253
|
+
var _this$_roomControl$ge = this._roomControl.getUserControl().getLocalUser(),
|
|
1254
|
+
userId = _this$_roomControl$ge.userId,
|
|
1255
|
+
userRole = _this$_roomControl$ge.userRole;
|
|
1220
1256
|
var hasVideo = this._deviceStore.cameraEnabled;
|
|
1221
1257
|
var hasAudio = this._deviceStore.microphoneEnabled;
|
|
1222
|
-
|
|
1258
|
+
var isHost = userRole === _type.FcrUserRole.HOST;
|
|
1259
|
+
var isCoHost = userRole === _type.FcrUserRole.COHOST;
|
|
1260
|
+
this.localMicrophoneMute = !hasAudio;
|
|
1223
1261
|
this._localUser = {
|
|
1224
|
-
userId:
|
|
1262
|
+
userId: userId,
|
|
1225
1263
|
hasVideo: hasVideo,
|
|
1226
1264
|
hasAudio: hasAudio,
|
|
1227
|
-
isHost:
|
|
1228
|
-
isCoHost:
|
|
1265
|
+
isHost: isHost,
|
|
1266
|
+
isCoHost: isCoHost,
|
|
1229
1267
|
volume: this._deviceStore.microphoneVolumeLevel
|
|
1230
1268
|
};
|
|
1231
|
-
var streams = this._streamControl.getStreamsByUserId(
|
|
1269
|
+
var streams = this._streamControl.getStreamsByUserId(userId);
|
|
1232
1270
|
var loopbackAudioStream = streams.find(function (stream) {
|
|
1233
1271
|
return stream.audioSourceType === _type4.AgoraRteAudioSourceType.LOOPBACK;
|
|
1234
1272
|
});
|
|
@@ -1241,7 +1279,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1241
1279
|
|
|
1242
1280
|
var hasPstnStream = streams.some(function (_ref3) {
|
|
1243
1281
|
var connectorType = _ref3.connectorType;
|
|
1244
|
-
return connectorType ===
|
|
1282
|
+
return connectorType === _agoraEduCore.FcrRoomConnectorType.PSTN;
|
|
1245
1283
|
});
|
|
1246
1284
|
this._connectType = hasPstnStream ? _type5.ConnectType.PHONE : this._deviceStore.currentDeviceId ? _type5.ConnectType.COMPUTER : _type5.ConnectType.NONE;
|
|
1247
1285
|
(0, _rendererEvent.sendEvent)({
|
|
@@ -1249,6 +1287,11 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1249
1287
|
payload: this._connectType
|
|
1250
1288
|
});
|
|
1251
1289
|
}
|
|
1290
|
+
}, {
|
|
1291
|
+
key: "_onStreamRemoved",
|
|
1292
|
+
value: function _onStreamRemoved(roomId, events) {
|
|
1293
|
+
this._refreshLocalUser(roomId, events);
|
|
1294
|
+
}
|
|
1252
1295
|
}, {
|
|
1253
1296
|
key: "_addEventListeners",
|
|
1254
1297
|
value: function _addEventListeners() {
|
|
@@ -1286,13 +1329,13 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1286
1329
|
this._disposers.push((0, _mobx.reaction)(function () {
|
|
1287
1330
|
return _this6.shareControlBarActive;
|
|
1288
1331
|
}, /*#__PURE__*/function () {
|
|
1289
|
-
var _ref4 = (0, _asyncToGenerator2["default"])(
|
|
1332
|
+
var _ref4 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee10(active) {
|
|
1290
1333
|
var cameraList, microphoneList, speakerList, localUser, scheduleInfo, liveStreamingConfig;
|
|
1291
|
-
return _regenerator["default"].wrap(function
|
|
1292
|
-
while (1) switch (
|
|
1334
|
+
return _regenerator["default"].wrap(function _callee10$(_context10) {
|
|
1335
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
1293
1336
|
case 0:
|
|
1294
1337
|
if (!active) {
|
|
1295
|
-
|
|
1338
|
+
_context10.next = 60;
|
|
1296
1339
|
break;
|
|
1297
1340
|
}
|
|
1298
1341
|
_this6._deviceStore.addObserver(_this6._deviceStoreObserver);
|
|
@@ -1300,114 +1343,114 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1300
1343
|
microphoneList = _this6._deviceStore.microphoneList;
|
|
1301
1344
|
speakerList = _this6._deviceStore.speakerList;
|
|
1302
1345
|
localUser = _this6._roomControl.getUserControl().getLocalUser();
|
|
1303
|
-
scheduleInfo = _this6._roomControl.
|
|
1346
|
+
scheduleInfo = _this6._roomControl.getRoomSchedule();
|
|
1304
1347
|
liveStreamingConfig = _this6._roomControl.getLiveStreamingConfig();
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1348
|
+
_context10.t0 = _rendererEvent.sendEvent;
|
|
1349
|
+
_context10.t1 = _constant.RendererEventAction.INIT_CONTROL_BAR;
|
|
1350
|
+
_context10.t2 = _shareAudio.AudioProcessingChannel.MONO;
|
|
1351
|
+
_context10.t3 = _this6.currentShareId;
|
|
1352
|
+
_context10.t4 = _this6.currentShareType;
|
|
1353
|
+
_context10.t5 = _this6.withAudio;
|
|
1354
|
+
_context10.t6 = cameraList;
|
|
1355
|
+
_context10.t7 = _this6._deviceStore.cameraId;
|
|
1356
|
+
_context10.t8 = !_this6.localVideoState;
|
|
1357
|
+
_context10.t9 = microphoneList;
|
|
1358
|
+
_context10.t10 = speakerList;
|
|
1359
|
+
_context10.t11 = _this6._deviceStore.microphoneId;
|
|
1360
|
+
_context10.t12 = _this6._deviceStore.speakerId;
|
|
1361
|
+
_context10.t13 = !_this6.localAudioState;
|
|
1362
|
+
_context10.t14 = _this6._deviceStore.microphoneVolumeLevel;
|
|
1363
|
+
_context10.t15 = (scheduleInfo === null || scheduleInfo === void 0 ? void 0 : scheduleInfo.duration) || 0;
|
|
1364
|
+
_context10.t16 = (scheduleInfo === null || scheduleInfo === void 0 ? void 0 : scheduleInfo.startTime) || new Date().getTime();
|
|
1365
|
+
_context10.t17 = localUser.userRole === _type.FcrUserRole.HOST;
|
|
1366
|
+
_context10.t18 = localUser.userRole === _type.FcrUserRole.HOST;
|
|
1367
|
+
_context10.t19 = _this6._securityStore.allowChangeSelfName();
|
|
1368
|
+
_context10.t20 = _this6._securityStore.allowChat();
|
|
1369
|
+
_context10.t21 = _this6._securityStore.allowJoinWithMuteAudio();
|
|
1370
|
+
_context10.t22 = _this6._securityStore.allowScreenShareAndBoard();
|
|
1371
|
+
_context10.t23 = _this6._securityStore.allowUnmuteSelfVideo();
|
|
1372
|
+
_context10.t24 = _this6._securityStore.allowUnmuteSelfAudio();
|
|
1373
|
+
_context10.t25 = _this6._securityStore.isLockRoomEnabled();
|
|
1374
|
+
_context10.t26 = _this6._securityStore.isWaitingRoomEnabled();
|
|
1375
|
+
_context10.t27 = liveStreamingConfig === null || liveStreamingConfig === void 0 ? void 0 : liveStreamingConfig.pushStreamingUrl;
|
|
1376
|
+
_context10.t28 = liveStreamingConfig === null || liveStreamingConfig === void 0 ? void 0 : liveStreamingConfig.pushStreamingUrl;
|
|
1377
|
+
_context10.t29 = liveStreamingConfig === null || liveStreamingConfig === void 0 ? void 0 : liveStreamingConfig.pullStreamingUrl;
|
|
1378
|
+
_context10.t30 = _this6._roomControl.getLiveStreamingState();
|
|
1379
|
+
_context10.t31 = _this6._securityStore.hasStartCloudRecordingPermission();
|
|
1380
|
+
_context10.t32 = _this6._securityStore.hasStartLiveStreamingPermission();
|
|
1381
|
+
_context10.t33 = _this6._securityStore.hasStopLiveStreamingPermission();
|
|
1382
|
+
_context10.t34 = _this6._securityStore.hasGetLiveStreamingLinkPermission();
|
|
1383
|
+
_context10.next = 45;
|
|
1341
1384
|
return _this6._mediaControl.getWindowList();
|
|
1342
1385
|
case 45:
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
currentShareAudioProcessingChannel:
|
|
1353
|
-
currentShareId:
|
|
1354
|
-
currentShareType:
|
|
1355
|
-
shareWithAudio:
|
|
1356
|
-
cameraList:
|
|
1357
|
-
currentCameraId:
|
|
1358
|
-
isMuteVideo:
|
|
1359
|
-
microphoneList:
|
|
1360
|
-
speakerList:
|
|
1361
|
-
currentMicrophoneId:
|
|
1362
|
-
currentSpeakerId:
|
|
1363
|
-
isMuteAudio:
|
|
1364
|
-
localAudioVolume:
|
|
1365
|
-
duration:
|
|
1366
|
-
startTime:
|
|
1367
|
-
isHost:
|
|
1368
|
-
showSecurity:
|
|
1369
|
-
allowChangeSelfName:
|
|
1370
|
-
allowChat:
|
|
1371
|
-
allowJoinWithMuteAudio:
|
|
1372
|
-
allowShareScreen:
|
|
1373
|
-
allowUnmuteSelfVideo:
|
|
1374
|
-
allowUnmuteSelfAudio:
|
|
1375
|
-
isLockRoomEnabled:
|
|
1376
|
-
isWaitingRoomEnabled:
|
|
1377
|
-
videoSteamingUrl:
|
|
1378
|
-
videoStreamingKey:
|
|
1379
|
-
playUrl:
|
|
1380
|
-
liveStreamingState:
|
|
1386
|
+
_context10.t35 = _context10.sent;
|
|
1387
|
+
_context10.t36 = _this6._connectType;
|
|
1388
|
+
_context10.t37 = _this6._securityStore.hasEnableStartScreenSharePermission();
|
|
1389
|
+
_context10.t38 = _this6._securityStore.hasPermissionToControlAllowSendAll();
|
|
1390
|
+
_context10.t39 = _this6._securityStore.hasEnableStartAudioPermission();
|
|
1391
|
+
_context10.t40 = _this6._securityStore.hasEnableChangeNamePermission();
|
|
1392
|
+
_context10.t41 = _this6._securityStore.hasEnableStartVideoPermission();
|
|
1393
|
+
_context10.t42 = _this6._securityStore.hasLockRoomPermission();
|
|
1394
|
+
_context10.t43 = {
|
|
1395
|
+
currentShareAudioProcessingChannel: _context10.t2,
|
|
1396
|
+
currentShareId: _context10.t3,
|
|
1397
|
+
currentShareType: _context10.t4,
|
|
1398
|
+
shareWithAudio: _context10.t5,
|
|
1399
|
+
cameraList: _context10.t6,
|
|
1400
|
+
currentCameraId: _context10.t7,
|
|
1401
|
+
isMuteVideo: _context10.t8,
|
|
1402
|
+
microphoneList: _context10.t9,
|
|
1403
|
+
speakerList: _context10.t10,
|
|
1404
|
+
currentMicrophoneId: _context10.t11,
|
|
1405
|
+
currentSpeakerId: _context10.t12,
|
|
1406
|
+
isMuteAudio: _context10.t13,
|
|
1407
|
+
localAudioVolume: _context10.t14,
|
|
1408
|
+
duration: _context10.t15,
|
|
1409
|
+
startTime: _context10.t16,
|
|
1410
|
+
isHost: _context10.t17,
|
|
1411
|
+
showSecurity: _context10.t18,
|
|
1412
|
+
allowChangeSelfName: _context10.t19,
|
|
1413
|
+
allowChat: _context10.t20,
|
|
1414
|
+
allowJoinWithMuteAudio: _context10.t21,
|
|
1415
|
+
allowShareScreen: _context10.t22,
|
|
1416
|
+
allowUnmuteSelfVideo: _context10.t23,
|
|
1417
|
+
allowUnmuteSelfAudio: _context10.t24,
|
|
1418
|
+
isLockRoomEnabled: _context10.t25,
|
|
1419
|
+
isWaitingRoomEnabled: _context10.t26,
|
|
1420
|
+
videoSteamingUrl: _context10.t27,
|
|
1421
|
+
videoStreamingKey: _context10.t28,
|
|
1422
|
+
playUrl: _context10.t29,
|
|
1423
|
+
liveStreamingState: _context10.t30,
|
|
1381
1424
|
isStartError: false,
|
|
1382
|
-
hasStartCloudRecordingPermission:
|
|
1383
|
-
hasStartLiveStreamingPermission:
|
|
1384
|
-
hasStopLiveStreamingPermission:
|
|
1385
|
-
hasGetLiveStreamingLinkPermission:
|
|
1386
|
-
allApplicationWindows:
|
|
1387
|
-
connectType:
|
|
1388
|
-
hasEnableStartScreenSharePermission:
|
|
1389
|
-
hasPermissionToControlAllowSendAll:
|
|
1390
|
-
hasEnableStartAudioPermission:
|
|
1391
|
-
hasEnableChangeNamePermission:
|
|
1392
|
-
hasEnableStartVideoPermission:
|
|
1393
|
-
hasLockRoomPermission:
|
|
1425
|
+
hasStartCloudRecordingPermission: _context10.t31,
|
|
1426
|
+
hasStartLiveStreamingPermission: _context10.t32,
|
|
1427
|
+
hasStopLiveStreamingPermission: _context10.t33,
|
|
1428
|
+
hasGetLiveStreamingLinkPermission: _context10.t34,
|
|
1429
|
+
allApplicationWindows: _context10.t35,
|
|
1430
|
+
connectType: _context10.t36,
|
|
1431
|
+
hasEnableStartScreenSharePermission: _context10.t37,
|
|
1432
|
+
hasPermissionToControlAllowSendAll: _context10.t38,
|
|
1433
|
+
hasEnableStartAudioPermission: _context10.t39,
|
|
1434
|
+
hasEnableChangeNamePermission: _context10.t40,
|
|
1435
|
+
hasEnableStartVideoPermission: _context10.t41,
|
|
1436
|
+
hasLockRoomPermission: _context10.t42
|
|
1394
1437
|
};
|
|
1395
|
-
|
|
1396
|
-
action:
|
|
1397
|
-
payload:
|
|
1438
|
+
_context10.t44 = {
|
|
1439
|
+
action: _context10.t1,
|
|
1440
|
+
payload: _context10.t43
|
|
1398
1441
|
};
|
|
1399
|
-
(0,
|
|
1442
|
+
(0, _context10.t0)(_context10.t44);
|
|
1400
1443
|
window.runtime.browserWindow.setFullScreen(false);
|
|
1401
1444
|
window.runtime.browserWindow.hide();
|
|
1402
|
-
|
|
1445
|
+
_context10.next = 61;
|
|
1403
1446
|
break;
|
|
1404
1447
|
case 60:
|
|
1405
1448
|
_this6._deviceStore.removeObserver(_this6._deviceStoreObserver);
|
|
1406
1449
|
case 61:
|
|
1407
1450
|
case "end":
|
|
1408
|
-
return
|
|
1451
|
+
return _context10.stop();
|
|
1409
1452
|
}
|
|
1410
|
-
},
|
|
1453
|
+
}, _callee10);
|
|
1411
1454
|
}));
|
|
1412
1455
|
return function (_x10) {
|
|
1413
1456
|
return _ref4.apply(this, arguments);
|
|
@@ -1492,6 +1535,48 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1492
1535
|
}));
|
|
1493
1536
|
});
|
|
1494
1537
|
}
|
|
1538
|
+
}, {
|
|
1539
|
+
key: "_onUiEvent",
|
|
1540
|
+
value: function () {
|
|
1541
|
+
var _onUiEvent2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee11(event, params) {
|
|
1542
|
+
return _regenerator["default"].wrap(function _callee11$(_context11) {
|
|
1543
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
1544
|
+
case 0:
|
|
1545
|
+
_context11.t0 = event;
|
|
1546
|
+
_context11.next = _context11.t0 === _constant.UIAction.START_SHARE_SCREEN ? 3 : _context11.t0 === _constant.UIAction.SHOW_TOAST ? 5 : _context11.t0 === _constant.UIAction.STOP_SCREEN_CAPTURE ? 7 : _context11.t0 === _constant.UIAction.ENGINE_RECONNECTED ? 9 : 11;
|
|
1547
|
+
break;
|
|
1548
|
+
case 3:
|
|
1549
|
+
this.handleShareScreenResource();
|
|
1550
|
+
return _context11.abrupt("break", 11);
|
|
1551
|
+
case 5:
|
|
1552
|
+
if ((0, _env.isElectron)() && this.shareControlBarActive) {
|
|
1553
|
+
(0, _rendererEvent.sendEvent)({
|
|
1554
|
+
action: _constant.RendererEventAction.SHOW_TOAST,
|
|
1555
|
+
payload: params
|
|
1556
|
+
});
|
|
1557
|
+
}
|
|
1558
|
+
return _context11.abrupt("break", 11);
|
|
1559
|
+
case 7:
|
|
1560
|
+
this._closeCapture();
|
|
1561
|
+
// this.handleStopShare();
|
|
1562
|
+
return _context11.abrupt("break", 11);
|
|
1563
|
+
case 9:
|
|
1564
|
+
if (this._removeScreenStreamFailed) {
|
|
1565
|
+
this._removeScreenStream();
|
|
1566
|
+
this._removeScreenStreamFailed = false;
|
|
1567
|
+
}
|
|
1568
|
+
return _context11.abrupt("break", 11);
|
|
1569
|
+
case 11:
|
|
1570
|
+
case "end":
|
|
1571
|
+
return _context11.stop();
|
|
1572
|
+
}
|
|
1573
|
+
}, _callee11, this);
|
|
1574
|
+
}));
|
|
1575
|
+
function _onUiEvent(_x11, _x12) {
|
|
1576
|
+
return _onUiEvent2.apply(this, arguments);
|
|
1577
|
+
}
|
|
1578
|
+
return _onUiEvent;
|
|
1579
|
+
}()
|
|
1495
1580
|
}, {
|
|
1496
1581
|
key: "_removeReactions",
|
|
1497
1582
|
value: function _removeReactions() {
|
|
@@ -1513,34 +1598,34 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1513
1598
|
}, {
|
|
1514
1599
|
key: "_validateWindow",
|
|
1515
1600
|
value: function () {
|
|
1516
|
-
var _validateWindow2 = (0, _asyncToGenerator2["default"])(
|
|
1601
|
+
var _validateWindow2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee12(id) {
|
|
1517
1602
|
var window;
|
|
1518
|
-
return _regenerator["default"].wrap(function
|
|
1519
|
-
while (1) switch (
|
|
1603
|
+
return _regenerator["default"].wrap(function _callee12$(_context12) {
|
|
1604
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
1520
1605
|
case 0:
|
|
1521
|
-
|
|
1606
|
+
_context12.next = 2;
|
|
1522
1607
|
return this._mediaControl.getWindowList();
|
|
1523
1608
|
case 2:
|
|
1524
|
-
window =
|
|
1609
|
+
window = _context12.sent.filter(function (item) {
|
|
1525
1610
|
return item.title !== 'AgoraHighLighter' && item.title !== 'Development HTML';
|
|
1526
1611
|
}).find(function (item) {
|
|
1527
1612
|
return item.id === id;
|
|
1528
1613
|
});
|
|
1529
1614
|
if (window) {
|
|
1530
|
-
|
|
1615
|
+
_context12.next = 6;
|
|
1531
1616
|
break;
|
|
1532
1617
|
}
|
|
1533
1618
|
this._showToast((0, _i18n.transI18n)('fmt_screenshare_tips_faild_reselect'), 'error');
|
|
1534
|
-
return
|
|
1619
|
+
return _context12.abrupt("return", false);
|
|
1535
1620
|
case 6:
|
|
1536
|
-
return
|
|
1621
|
+
return _context12.abrupt("return", true);
|
|
1537
1622
|
case 7:
|
|
1538
1623
|
case "end":
|
|
1539
|
-
return
|
|
1624
|
+
return _context12.stop();
|
|
1540
1625
|
}
|
|
1541
|
-
},
|
|
1626
|
+
}, _callee12, this);
|
|
1542
1627
|
}));
|
|
1543
|
-
function _validateWindow(
|
|
1628
|
+
function _validateWindow(_x13) {
|
|
1544
1629
|
return _validateWindow2.apply(this, arguments);
|
|
1545
1630
|
}
|
|
1546
1631
|
return _validateWindow;
|
|
@@ -1548,32 +1633,32 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1548
1633
|
}, {
|
|
1549
1634
|
key: "_validateDisplay",
|
|
1550
1635
|
value: function () {
|
|
1551
|
-
var _validateDisplay2 = (0, _asyncToGenerator2["default"])(
|
|
1636
|
+
var _validateDisplay2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee13(id) {
|
|
1552
1637
|
var displayList;
|
|
1553
|
-
return _regenerator["default"].wrap(function
|
|
1554
|
-
while (1) switch (
|
|
1638
|
+
return _regenerator["default"].wrap(function _callee13$(_context13) {
|
|
1639
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
1555
1640
|
case 0:
|
|
1556
|
-
|
|
1641
|
+
_context13.next = 2;
|
|
1557
1642
|
return this._mediaControl.getDisplayList();
|
|
1558
1643
|
case 2:
|
|
1559
|
-
displayList =
|
|
1644
|
+
displayList = _context13.sent.find(function (item) {
|
|
1560
1645
|
return item.id === id;
|
|
1561
1646
|
});
|
|
1562
1647
|
if (displayList) {
|
|
1563
|
-
|
|
1648
|
+
_context13.next = 6;
|
|
1564
1649
|
break;
|
|
1565
1650
|
}
|
|
1566
1651
|
this._showToast((0, _i18n.transI18n)('fmt_screenshare_tips_faild_screenselect'), 'error');
|
|
1567
|
-
return
|
|
1652
|
+
return _context13.abrupt("return", false);
|
|
1568
1653
|
case 6:
|
|
1569
|
-
return
|
|
1654
|
+
return _context13.abrupt("return", true);
|
|
1570
1655
|
case 7:
|
|
1571
1656
|
case "end":
|
|
1572
|
-
return
|
|
1657
|
+
return _context13.stop();
|
|
1573
1658
|
}
|
|
1574
|
-
},
|
|
1659
|
+
}, _callee13, this);
|
|
1575
1660
|
}));
|
|
1576
|
-
function _validateDisplay(
|
|
1661
|
+
function _validateDisplay(_x14) {
|
|
1577
1662
|
return _validateDisplay2.apply(this, arguments);
|
|
1578
1663
|
}
|
|
1579
1664
|
return _validateDisplay;
|
|
@@ -1581,50 +1666,50 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1581
1666
|
}, {
|
|
1582
1667
|
key: "_validateShareStart",
|
|
1583
1668
|
value: function () {
|
|
1584
|
-
var _validateShareStart2 = (0, _asyncToGenerator2["default"])(
|
|
1585
|
-
return _regenerator["default"].wrap(function
|
|
1586
|
-
while (1) switch (
|
|
1669
|
+
var _validateShareStart2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee14(id, type) {
|
|
1670
|
+
return _regenerator["default"].wrap(function _callee14$(_context14) {
|
|
1671
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
1587
1672
|
case 0:
|
|
1588
|
-
|
|
1589
|
-
if (!
|
|
1590
|
-
|
|
1673
|
+
_context14.t0 = type === _type2.AgoraRtcScreenCaptureType.WINDOW;
|
|
1674
|
+
if (!_context14.t0) {
|
|
1675
|
+
_context14.next = 5;
|
|
1591
1676
|
break;
|
|
1592
1677
|
}
|
|
1593
|
-
|
|
1678
|
+
_context14.next = 4;
|
|
1594
1679
|
return this._validateWindow(id);
|
|
1595
1680
|
case 4:
|
|
1596
|
-
|
|
1681
|
+
_context14.t0 = !_context14.sent;
|
|
1597
1682
|
case 5:
|
|
1598
|
-
if (!
|
|
1599
|
-
|
|
1683
|
+
if (!_context14.t0) {
|
|
1684
|
+
_context14.next = 7;
|
|
1600
1685
|
break;
|
|
1601
1686
|
}
|
|
1602
|
-
return
|
|
1687
|
+
return _context14.abrupt("return", false);
|
|
1603
1688
|
case 7:
|
|
1604
|
-
|
|
1605
|
-
if (!
|
|
1606
|
-
|
|
1689
|
+
_context14.t1 = type === _type2.AgoraRtcScreenCaptureType.DISPLAY;
|
|
1690
|
+
if (!_context14.t1) {
|
|
1691
|
+
_context14.next = 12;
|
|
1607
1692
|
break;
|
|
1608
1693
|
}
|
|
1609
|
-
|
|
1694
|
+
_context14.next = 11;
|
|
1610
1695
|
return this._validateDisplay(id);
|
|
1611
1696
|
case 11:
|
|
1612
|
-
|
|
1697
|
+
_context14.t1 = !_context14.sent;
|
|
1613
1698
|
case 12:
|
|
1614
|
-
if (!
|
|
1615
|
-
|
|
1699
|
+
if (!_context14.t1) {
|
|
1700
|
+
_context14.next = 14;
|
|
1616
1701
|
break;
|
|
1617
1702
|
}
|
|
1618
|
-
return
|
|
1703
|
+
return _context14.abrupt("return", false);
|
|
1619
1704
|
case 14:
|
|
1620
|
-
return
|
|
1705
|
+
return _context14.abrupt("return", true);
|
|
1621
1706
|
case 15:
|
|
1622
1707
|
case "end":
|
|
1623
|
-
return
|
|
1708
|
+
return _context14.stop();
|
|
1624
1709
|
}
|
|
1625
|
-
},
|
|
1710
|
+
}, _callee14, this);
|
|
1626
1711
|
}));
|
|
1627
|
-
function _validateShareStart(
|
|
1712
|
+
function _validateShareStart(_x15, _x16) {
|
|
1628
1713
|
return _validateShareStart2.apply(this, arguments);
|
|
1629
1714
|
}
|
|
1630
1715
|
return _validateShareStart;
|
|
@@ -1641,14 +1726,14 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1641
1726
|
}, {
|
|
1642
1727
|
key: "_getExcludeWindows",
|
|
1643
1728
|
value: function () {
|
|
1644
|
-
var _getExcludeWindows2 = (0, _asyncToGenerator2["default"])(
|
|
1729
|
+
var _getExcludeWindows2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee15() {
|
|
1645
1730
|
var excludeWindows, windowId, _windowId$split, _windowId$split2, videoWindowId, _windowId$split3, _windowId$split4, controlBarWindowId;
|
|
1646
|
-
return _regenerator["default"].wrap(function
|
|
1647
|
-
while (1) switch (
|
|
1731
|
+
return _regenerator["default"].wrap(function _callee15$(_context15) {
|
|
1732
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
1648
1733
|
case 0:
|
|
1649
1734
|
excludeWindows = [];
|
|
1650
1735
|
windowId = '';
|
|
1651
|
-
|
|
1736
|
+
_context15.next = 4;
|
|
1652
1737
|
return (0, _tools.waitUntil)(function () {
|
|
1653
1738
|
var _getControlBarMediaSo;
|
|
1654
1739
|
windowId = (_getControlBarMediaSo = (0, _rendererEvent.getControlBarMediaSourceId)()) !== null && _getControlBarMediaSo !== void 0 ? _getControlBarMediaSo : '';
|
|
@@ -1657,7 +1742,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1657
1742
|
case 4:
|
|
1658
1743
|
_windowId$split = windowId.split(':'), _windowId$split2 = (0, _slicedToArray2["default"])(_windowId$split, 2), videoWindowId = _windowId$split2[1];
|
|
1659
1744
|
excludeWindows.push(videoWindowId);
|
|
1660
|
-
|
|
1745
|
+
_context15.next = 8;
|
|
1661
1746
|
return (0, _tools.waitUntil)(function () {
|
|
1662
1747
|
var _getVideoWindowMediaS;
|
|
1663
1748
|
windowId = (_getVideoWindowMediaS = (0, _rendererEvent.getVideoWindowMediaSourceId)()) !== null && _getVideoWindowMediaS !== void 0 ? _getVideoWindowMediaS : '';
|
|
@@ -1667,12 +1752,12 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1667
1752
|
_windowId$split3 = windowId.split(':'), _windowId$split4 = (0, _slicedToArray2["default"])(_windowId$split3, 2), controlBarWindowId = _windowId$split4[1];
|
|
1668
1753
|
this.logger.info('exclude win:', videoWindowId, controlBarWindowId);
|
|
1669
1754
|
excludeWindows.push(controlBarWindowId);
|
|
1670
|
-
return
|
|
1755
|
+
return _context15.abrupt("return", excludeWindows);
|
|
1671
1756
|
case 12:
|
|
1672
1757
|
case "end":
|
|
1673
|
-
return
|
|
1758
|
+
return _context15.stop();
|
|
1674
1759
|
}
|
|
1675
|
-
},
|
|
1760
|
+
}, _callee15, this);
|
|
1676
1761
|
}));
|
|
1677
1762
|
function _getExcludeWindows() {
|
|
1678
1763
|
return _getExcludeWindows2.apply(this, arguments);
|
|
@@ -1682,7 +1767,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1682
1767
|
}]);
|
|
1683
1768
|
}();
|
|
1684
1769
|
_ShareScreenStore = ShareScreenStore;
|
|
1685
|
-
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_ShareScreenStore, [[_mobx.observable, 1, "_shareSelectionDialogId"], [_mobx.observable, 1, "_controlBarDialogId"], [_mobx.observable, 1, "_videoWindowDialogId"], [_mobx.observable, 1, "_isHost"], [_mobx.observable, 1, "_shareLocked"], [_mobx.observable, 1, "_screenTrack"], [_mobx.observable, 1, "_shareAudioTrack"], [_mobx.observable, 1, "_localUser"], [_mobx.observable, 1, "screenSharingState"], [_mobx.observable, 1, "applicationCaptureSources"], [_mobx.observable, 1, "screenCaptureSources"], [_mobx.observable, 1, "hasScreenCapturePermission"], [_mobx.observable, 1, "showConfirm"], [_mobx.observable, 1, "shareControlBarActive"], [_mobx.observable, 1, "withAudio"], [_mobx.observable, 1, "currentShareAudioProcessingChannel"], [_mobx.observable, 1, "currentShareId"], [_mobx.observable, 1, "sharerId"], [_mobx.observable, 1, "currentShareType"], [_mobx.observable, 1, "currentSelection"], [_mobx.observable, 1, "currentSelectionType"], [_mobx.observable, 1, "shareWithAudio"], [_mobx.observable, 1, "boardOwnerUser"], [_mobx.observable, 1, "localUser"], [_mobx.observable, 1, "localUserRole"], [_mobx.observable, 1, "title"], [_mobx.computed, 3, "localVideoState"], [_mobx.computed, 3, "localAudioState"], [_mobx.computed, 3, "localAudioVolume"], [_setShareWithAudioStateDecs, 18, "setShareWithAudioState"], [_setShareAudioProcessingChannelDecs, 18, "setShareAudioProcessingChannel"], [_decorator.bound, 2, "handlerBoardShareStop"], [
|
|
1770
|
+
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_ShareScreenStore, [[_mobx.observable, 1, "_shareSelectionDialogId"], [_mobx.observable, 1, "_controlBarDialogId"], [_mobx.observable, 1, "_videoWindowDialogId"], [_mobx.observable, 1, "_isHost"], [_mobx.observable, 1, "_shareLocked"], [_mobx.observable, 1, "_screenTrack"], [_mobx.observable, 1, "_shareAudioTrack"], [_mobx.observable, 1, "_localUser"], [_mobx.observable, 1, "screenSharingState"], [_mobx.observable, 1, "applicationCaptureSources"], [_mobx.observable, 1, "screenCaptureSources"], [_mobx.observable, 1, "hasScreenCapturePermission"], [_mobx.observable, 1, "showConfirm"], [_mobx.observable, 1, "shareControlBarActive"], [_mobx.observable, 1, "withAudio"], [_mobx.observable, 1, "currentShareAudioProcessingChannel"], [_mobx.observable, 1, "currentShareId"], [_mobx.observable, 1, "sharerId"], [_mobx.observable, 1, "currentShareType"], [_mobx.observable, 1, "currentSelection"], [_mobx.observable, 1, "currentSelectionType"], [_mobx.observable, 1, "shareWithAudio"], [_mobx.observable, 1, "boardOwnerUser"], [_mobx.observable, 1, "localUser"], [_mobx.observable, 1, "localUserRole"], [_mobx.observable, 1, "title"], [_mobx.observable, 1, "localMicrophoneMute"], [_mobx.computed, 3, "localVideoState"], [_mobx.computed, 3, "localAudioState"], [_mobx.computed, 3, "localAudioVolume"], [_setShareWithAudioStateDecs, 18, "setShareWithAudioState"], [_setShareAudioProcessingChannelDecs, 18, "setShareAudioProcessingChannel"], [_decorator.bound, 2, "handlerBoardShareStop"], [_sendLocalAudioStateEventDecs, 18, "sendLocalAudioStateEvent"], [_decorator.bound, 2, "release"], [_handleCheckScreenCapturePermissionDecs, 18, "handleCheckScreenCapturePermission"], [_handleToSettingDecs, 18, "handleToSetting"], [_muteLocalAudioDecs, 18, "muteLocalAudio"], [_muteLocalVideoDecs, 18, "muteLocalVideo"], [_handleShareStartWithAudioDecs, 18, "handleShareStartWithAudio"], [_handleShareStopWithAudioDecs, 18, "handleShareStopWithAudio"], [_startPreviewDecs, 18, "startPreview"], [_setShareControlBarActiveDecs, 18, "setShareControlBarActive"], [_setCurrentCameraIdDecs, 18, "setCurrentCameraId"], [_setCurrentSpeakerIdDecs, 18, "setCurrentSpeakerId"], [_setCurrentMicrophoneIdDecs, 18, "setCurrentMicrophoneId"], [_setAllowChangeSelfNameDecs, 18, "setAllowChangeSelfName"], [_setAllowChatDecs, 18, "setAllowChat"], [_setAllowJoinWithMuteAudioDecs, 18, "setAllowJoinWithMuteAudio"], [_setAllowShareScreenDecs, 18, "setAllowShareScreen"], [_setAllowUnmuteSelfVideoDecs, 18, "setAllowUnmuteSelfVideo"], [_setAllowUnmuteSelfAudioDecs, 18, "setAllowUnmuteSelfAudio"], [_setLockRoomEnabledDecs, 18, "setLockRoomEnabled"], [_setWaitingRoomEnabledDecs, 18, "setWaitingRoomEnabled"], [_openDialogDecs, 18, "openDialog"], [_decorator.bound, 2, "closeDialog"], [_decorator.bound, 2, "openLiveStreamingDialog"], [_closeShareScreenSelectionDecs, 18, "closeShareScreenSelection"], [_openControlBarDecs, 18, "openControlBar"], [_setControlBarWindowIdDecs, 18, "setControlBarWindowId"], [_openVideoWindowDialogDecs, 18, "openVideoWindowDialog"], [_closeControlBarDecs, 18, "closeControlBar"], [_closeVideoWindowDialogDecs, 18, "closeVideoWindowDialog"], [_setShareWithAudioDecs, 18, "setShareWithAudio"], [_setWithAudioStateDecs, 18, "_setWithAudioState"], [_handleShareScreenResourceDecs, 18, "handleShareScreenResource"], [_handleStartShareDecs, 18, "handleStartShare"], [_handleReplaceScreenDecs, 18, "handleReplaceScreen"], [_handleStopShareDecs, 18, "handleStopShare"], [_decorator.bound, 2, "_handleWebScreenCaptureStateUpdated"], [_handleScreenCaptureStateUpdatedDecs, 18, "_handleScreenCaptureStateUpdated"], [_updateCameraListDecs, 18, "_updateCameraList"], [_updateMicrophoneListDecs, 18, "_updateMicrophoneList"], [_updateSpeakerListDecs, 18, "_updateSpeakerList"], [_handleLiveStreamingStateUpdatedDecs, 18, "_handleLiveStreamingStateUpdated"], [_setShareLockDecs, 18, "_setShareLock"], [_decorator.bound, 2, "_syncShareStreamState"], [_refreshLocalUserDecs, 18, "_refreshLocalUser"], [_handleChooseScreenDecs, 16, "handleChooseScreen"]], []).e, 29);
|
|
1686
1771
|
_init__shareSelectionDialogId = _applyDecs$e[0];
|
|
1687
1772
|
_init__controlBarDialogId = _applyDecs$e[1];
|
|
1688
1773
|
_init__videoWindowDialogId = _applyDecs$e[2];
|
|
@@ -1709,6 +1794,7 @@ _init_boardOwnerUser = _applyDecs$e[22];
|
|
|
1709
1794
|
_init_localUser = _applyDecs$e[23];
|
|
1710
1795
|
_init_localUserRole = _applyDecs$e[24];
|
|
1711
1796
|
_init_title = _applyDecs$e[25];
|
|
1712
|
-
|
|
1713
|
-
|
|
1797
|
+
_init_localMicrophoneMute = _applyDecs$e[26];
|
|
1798
|
+
_init_handleChooseScreen = _applyDecs$e[27];
|
|
1799
|
+
_initProto = _applyDecs$e[28];
|
|
1714
1800
|
var StoreContext = exports.StoreContext = /*#__PURE__*/(0, _react.createContext)(null);
|