fcr-ui-scene 3.6.1 → 3.6.2
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/317.js +2 -0
- package/dist/317.js.LICENSE.txt +20 -0
- package/dist/651.js +2 -0
- package/dist/651.js.LICENSE.txt +1 -0
- package/dist/689343b64b60bfb7ffff.png +0 -0
- package/dist/73.js +1 -0
- package/dist/885f9369ea05a8ac0e56.png +0 -0
- package/dist/90f383876a6e93e7c7ca.png +0 -0
- package/dist/9b37584780995fc5df8c.gif +0 -0
- package/dist/annotation.e5cbd3a70b6d42361872.css +1274 -0
- package/dist/annotation.html +1 -0
- package/dist/annotation.js +2 -0
- package/dist/annotation.js.LICENSE.txt +252 -0
- package/dist/assets/browser/images/default1.jpg +0 -0
- package/dist/assets/browser/images/default2.jpg +0 -0
- package/dist/assets/browser/images/default3.jpg +0 -0
- package/dist/assets/browser/images/default4.jpg +0 -0
- package/dist/assets/browser/images/default5.jpg +0 -0
- package/dist/assets/browser/images/default6.jpg +0 -0
- package/dist/assets/browser/images/default7.jpg +0 -0
- package/dist/assets/browser/sound_effects/pretest.mp3 +0 -0
- package/dist/assets/browser/sound_effects/recording_started.mp3 +0 -0
- package/dist/assets/browser/sound_effects/remote_user_joined.mp3 +0 -0
- package/dist/assets/browser/sound_effects/speaker_test.mp3 +0 -0
- package/dist/assets/browser/videos/default8.mp4 +0 -0
- package/dist/assets/browser/videos/default9.mp4 +0 -0
- package/dist/assets/cursors/fcr_whiteboard_input.ico +0 -0
- package/dist/assets/cursors/fcr_whiteboard_pen.ico +0 -0
- package/dist/assets/cursors/fcr_whiteboard_shape_-straightline.ico +0 -0
- package/dist/assets/cursors/fcr_whiteboard_shape_arrow.ico +0 -0
- package/dist/assets/cursors/fcr_whiteboard_shape_circle.ico +0 -0
- package/dist/assets/cursors/fcr_whiteboard_shape_rectangle.ico +0 -0
- package/dist/assets/cursors/fcr_whiteboard_shape_triangle.ico +0 -0
- package/dist/assets/electron/images/default1.jpg +0 -0
- package/dist/assets/electron/images/default2.jpg +0 -0
- package/dist/assets/electron/sound_effects/pretest.mp3 +0 -0
- package/dist/assets/electron/videos/default8.mp4 +0 -0
- package/dist/assets/fcr_chat_reddot.svg +5 -0
- package/dist/assets/fcr_defaultpage.png +0 -0
- package/dist/assets/fcr_grid_big.svg +3 -0
- package/dist/assets/fcr_leave2.svg +58 -0
- package/dist/assets/fcr_listontop_big.svg +3 -0
- package/dist/assets/full-screen-error-boundary-img.png +0 -0
- package/dist/assets/leave-meeting.png +0 -0
- package/dist/assets/loading.gif +0 -0
- package/dist/assets/login_confirm.png +0 -0
- package/dist/assets/pretest.mp3 +0 -0
- package/dist/assets/state-bar-logo.png +0 -0
- package/dist/assets/step-gradient.svg +10 -0
- package/dist/b74b002687a3a3346bec.png +0 -0
- package/dist/b94869094481702f949b.png +0 -0
- package/dist/ebeace75fd46b90d890e.png +0 -0
- package/dist/electron/app.js +194 -0
- package/dist/electron/bootstrap-dev.js +46 -0
- package/dist/electron/bootstrap-sdk.js +211 -0
- package/dist/electron/default-options.js +25 -0
- package/dist/electron/env.js +13 -0
- package/dist/electron/index.js +20 -0
- package/dist/electron/injections.js +903 -0
- package/dist/electron/ipc/ipc.js +141 -0
- package/dist/electron/ipc/type.js +19 -0
- package/dist/electron/logger.js +65 -0
- package/dist/electron/main.js +94 -0
- package/dist/electron/plugins/devtool-shortcut.js +33 -0
- package/dist/electron/plugins/meeting-state.js +39 -0
- package/dist/electron/plugins/screenshot.js +54 -0
- package/dist/electron/preload.js +108 -0
- package/dist/electron/tools.js +66 -0
- package/dist/electron/window.js +123 -0
- package/dist/extensions/agora-extension-virtual-background/agora-wasm.wasm +0 -0
- package/dist/extensions/ai-denoiser/denoiser-wasm-simd.wasm +0 -0
- package/dist/extensions/ai-denoiser/denoiser-wasm.js +1 -0
- package/dist/extensions/ai-denoiser/denoiser-wasm.wasm +0 -0
- package/dist/fad688b9135b15d6c405.png +0 -0
- package/dist/index.html +224 -0
- package/dist/main.393a2a91ab7fc05ffce6.css +15403 -0
- package/dist/main.js +2 -0
- package/dist/main.js.LICENSE.txt +272 -0
- package/dist/worker-entry.worker.js.LICENSE.txt +13 -0
- package/lib/creator.d.ts +5 -0
- package/lib/creator.js +106 -17
- package/lib/electron/bootstrap-sdk.js +4 -0
- package/lib/electron/injections.d.ts +4 -0
- package/lib/electron/injections.js +37 -8
- package/lib/electron/ipc/ipc.d.ts +1 -0
- package/lib/electron/ipc/ipc.js +4 -0
- package/lib/electron/main.js +6 -2
- package/lib/electron/plugins/screenshot.js +4 -2
- package/lib/electron/preload.js +7 -2
- package/lib/electron/window.js +4 -3
- package/lib/fragments/annotation/index.d.ts +10 -0
- package/lib/fragments/annotation/index.js +106 -0
- package/lib/fragments/annotation/libs.d.ts +55 -0
- package/lib/fragments/annotation/libs.js +93 -0
- package/lib/fragments/annotation/store.d.ts +25 -0
- package/lib/fragments/annotation/store.js +485 -0
- package/lib/fragments/annotation/view.d.ts +2 -0
- package/lib/fragments/annotation/view.js +23 -0
- package/lib/fragments/base.d.ts +10 -0
- package/lib/fragments/base.js +44 -0
- package/lib/modules/action-bar/components/screen-share/submenu.js +7 -6
- package/lib/modules/action-bar/index.css +7 -0
- package/lib/modules/action-bar/index.d.ts +2 -0
- package/lib/modules/action-bar/index.js +1 -0
- package/lib/modules/action-bar/store.d.ts +6 -2
- package/lib/modules/action-bar/store.js +15 -9
- package/lib/modules/annotation/components/control-bar/index.css +48 -0
- package/lib/modules/annotation/components/control-bar/index.d.ts +3 -0
- package/lib/modules/annotation/components/control-bar/index.js +101 -0
- package/lib/modules/annotation/components/toolbar/components/color-tool/color-panel/index.d.ts +3 -0
- package/lib/modules/annotation/components/toolbar/components/color-tool/color-panel/index.js +46 -0
- package/lib/modules/annotation/components/toolbar/components/color-tool/index.d.ts +1 -0
- package/lib/modules/annotation/components/toolbar/components/color-tool/index.js +52 -0
- package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/index.d.ts +3 -0
- package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/index.js +59 -0
- package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/libs.d.ts +11 -0
- package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/libs.js +59 -0
- package/lib/modules/annotation/components/toolbar/components/graphic-tool/index.d.ts +1 -0
- package/lib/modules/annotation/components/toolbar/components/graphic-tool/index.js +68 -0
- package/lib/modules/annotation/components/toolbar/components/item/item.d.ts +17 -0
- package/lib/modules/annotation/components/toolbar/components/item/item.js +115 -0
- package/lib/modules/annotation/components/toolbar/components/item/style.css +43 -0
- package/lib/modules/annotation/components/toolbar/components/panel/index.d.ts +5 -0
- package/lib/modules/annotation/components/toolbar/components/panel/index.js +22 -0
- package/lib/modules/annotation/components/toolbar/components/panel/style.css +24 -0
- package/lib/modules/annotation/components/toolbar/components/pen-tool/index.d.ts +1 -0
- package/lib/modules/annotation/components/toolbar/components/pen-tool/index.js +58 -0
- package/lib/modules/annotation/components/toolbar/components/pen-tool/pen-panel/index.d.ts +3 -0
- package/lib/modules/annotation/components/toolbar/components/pen-tool/pen-panel/index.js +34 -0
- package/lib/modules/annotation/components/toolbar/components/tips/index.d.ts +2 -0
- package/lib/modules/annotation/components/toolbar/components/tips/index.js +25 -0
- package/lib/modules/annotation/components/toolbar/components/tips/style.css +19 -0
- package/lib/modules/annotation/components/toolbar/index.d.ts +0 -0
- package/lib/modules/annotation/components/toolbar/index.js +1 -0
- package/lib/modules/annotation/components/toolbar/store.d.ts +40 -0
- package/lib/modules/annotation/components/toolbar/store.js +279 -0
- package/lib/modules/annotation/components/toolbar/style.css +55 -0
- package/lib/modules/annotation/components/toolbar/view.d.ts +2 -0
- package/lib/modules/annotation/components/toolbar/view.js +120 -0
- package/lib/modules/annotation/index.d.ts +36 -0
- package/lib/modules/annotation/index.js +168 -0
- package/lib/modules/annotation/store.d.ts +85 -0
- package/lib/modules/annotation/store.js +648 -0
- package/lib/modules/annotation/style.css +26 -0
- package/lib/modules/annotation/view.d.ts +2 -0
- package/lib/modules/annotation/view.js +32 -0
- package/lib/modules/chat/view.js +112 -100
- package/lib/modules/components/annotation-menu/index.d.ts +7 -0
- package/lib/modules/components/annotation-menu/index.js +119 -0
- package/lib/modules/components/leave-meeting/components/assign-host.js +26 -23
- package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.d.ts +2 -0
- package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.js +6 -2
- package/lib/modules/components/member-window/components/video-player/components/remote-video-player.d.ts +2 -1
- package/lib/modules/components/member-window/components/video-player/components/remote-video-player.js +6 -1
- package/lib/modules/components/member-window/components/video-player/index.d.ts +1 -0
- package/lib/modules/components/member-window/index.d.ts +1 -1
- package/lib/modules/components/member-window/index.js +8 -5
- package/lib/modules/components/member-window/types.d.ts +2 -0
- package/lib/modules/components/security-menu/index.js +7 -6
- package/lib/modules/control-bar/components/annotation-button/index.d.ts +1 -0
- package/lib/modules/control-bar/components/annotation-button/index.js +59 -0
- package/lib/modules/control-bar/index.d.ts +6 -2
- package/lib/modules/control-bar/index.js +5 -2
- package/lib/modules/control-bar/store.d.ts +23 -7
- package/lib/modules/control-bar/store.js +112 -77
- package/lib/modules/control-bar/view.js +7 -3
- package/lib/modules/dialog/components/annotation-tool/index.d.ts +4 -0
- package/lib/modules/dialog/components/annotation-tool/index.js +53 -0
- package/lib/modules/dialog/components/chat/index.js +1 -1
- package/lib/modules/dialog/components/host-area-container/index.d.ts +12 -0
- package/lib/modules/dialog/components/host-area-container/index.js +214 -0
- package/lib/modules/dialog/components/participant/index.js +1 -1
- package/lib/modules/dialog/components/system-preference/index.js +1 -1
- package/lib/modules/dialog/components/video-window/index.js +1 -0
- package/lib/modules/dialog/hooks/use-popover-watcher.d.ts +14 -0
- package/lib/modules/dialog/hooks/use-popover-watcher.js +112 -0
- package/lib/modules/dialog/hooks/useElectron.d.ts +1 -0
- package/lib/modules/dialog/hooks/useElectron.js +11 -2
- package/lib/modules/dialog/index.d.ts +2 -0
- package/lib/modules/dialog/index.js +2 -1
- package/lib/modules/dialog/store.d.ts +9 -2
- package/lib/modules/dialog/store.js +46 -6
- package/lib/modules/event-confirm/components/window/index.d.ts +7 -0
- package/lib/modules/event-confirm/components/window/index.js +188 -0
- package/lib/modules/event-confirm/index.d.ts +4 -4
- package/lib/modules/event-confirm/index.js +6 -4
- package/lib/modules/event-confirm/store.d.ts +4 -5
- package/lib/modules/event-confirm/store.js +35 -26
- package/lib/modules/event-confirm/view.js +23 -171
- package/lib/modules/event-sound/index.js +1 -1
- package/lib/modules/layout/components/CommonVideoRenderer.js +30 -16
- package/lib/modules/layout/index.d.ts +4 -0
- package/lib/modules/layout/index.js +2 -0
- package/lib/modules/layout/store.d.ts +14 -2
- package/lib/modules/layout/store.js +77 -45
- package/lib/modules/participant/index.d.ts +2 -0
- package/lib/modules/participant/index.js +2 -1
- package/lib/modules/participant/store.d.ts +5 -2
- package/lib/modules/participant/store.js +45 -28
- package/lib/modules/setting/audio-settings/audio-settings.js +3 -14
- package/lib/modules/share-screen/components/selection/index.js +18 -42
- package/lib/modules/share-screen/index.d.ts +6 -2
- package/lib/modules/share-screen/index.js +4 -2
- package/lib/modules/share-screen/store.d.ts +38 -46
- package/lib/modules/share-screen/store.js +263 -693
- package/lib/modules/share-screen/view.js +2 -2
- package/lib/modules/state-bar/assets/fcr_grid_big.svg +1 -1
- package/lib/modules/state-bar/assets/fcr_listontop_big.svg +1 -1
- package/lib/modules/state-bar/index.d.ts +2 -0
- package/lib/modules/state-bar/index.js +1 -0
- package/lib/modules/state-bar/store.d.ts +5 -1
- package/lib/modules/state-bar/store.js +9 -1
- package/lib/modules/state-bar/view.js +3 -2
- package/lib/modules/video-window/components/members/index.js +2 -1
- package/lib/modules/waiting-room-layout/store.js +1 -1
- package/lib/modules/whiteboard/components/control-bar/store.d.ts +5 -1
- package/lib/modules/whiteboard/components/control-bar/store.js +8 -1
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/picker.js +16 -5
- package/lib/modules/whiteboard/components/toolbar/components/eraser-picker.js +67 -12
- package/lib/modules/whiteboard/components/toolbar/components/expansion/index.js +22 -2
- package/lib/modules/whiteboard/components/toolbar/components/history.js +46 -14
- package/lib/modules/whiteboard/components/toolbar/components/item/index.js +3 -2
- package/lib/modules/whiteboard/components/toolbar/components/move-handle.js +1 -1
- package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +58 -16
- package/lib/modules/whiteboard/components/toolbar/components/screen-capture-picker.js +15 -4
- package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +45 -2
- package/lib/modules/whiteboard/components/toolbar/hooks/index.d.ts +14 -0
- package/lib/modules/whiteboard/components/toolbar/hooks/index.js +235 -7
- package/lib/modules/whiteboard/components/toolbar/index.d.ts +1 -1
- package/lib/modules/whiteboard/components/toolbar/index.js +1 -1
- package/lib/modules/whiteboard/components/toolbar/store.d.ts +9 -2
- package/lib/modules/whiteboard/components/toolbar/store.js +30 -6
- package/lib/modules/whiteboard/components/toolbar/{ style.css → style.css} +1 -0
- package/lib/modules/whiteboard/index.d.ts +2 -0
- package/lib/modules/whiteboard/index.js +20 -20
- package/lib/plugins/browser-runtime-plugin.js +10 -1
- package/lib/providers/annotation-provider.d.ts +77 -0
- package/lib/providers/annotation-provider.js +411 -0
- package/lib/providers/interpreter-provider.d.ts +1 -0
- package/lib/providers/interpreter-provider.js +182 -154
- package/lib/providers/privilege-provider.d.ts +35 -6
- package/lib/providers/privilege-provider.js +105 -49
- package/lib/providers/renderer-provider.js +3 -7
- package/lib/providers/room-provider.d.ts +13 -1
- package/lib/providers/room-provider.js +21 -7
- package/lib/providers/screen-share-provider.d.ts +131 -34
- package/lib/providers/screen-share-provider.js +561 -173
- package/lib/providers/sharing-provider.d.ts +33 -0
- package/lib/{shared-data-source/screen-share-data-source.js → providers/sharing-provider.js} +87 -39
- package/lib/runtime.d.ts +6 -1
- package/lib/scenes/main-scene.d.ts +7 -2
- package/lib/scenes/main-scene.js +54 -25
- package/lib/scenes/waiting-scene.d.ts +6 -0
- package/lib/scenes/waiting-scene.js +15 -5
- package/lib/shared-data-source/member-data.d.ts +21 -5
- package/lib/shared-data-source/member-data.js +69 -17
- package/lib/shared-data-source/screen-share-data.d.ts +270 -0
- package/lib/shared-data-source/screen-share-data.js +389 -0
- package/lib/shared-data-source/security-data.d.ts +4 -1
- package/lib/shared-data-source/security-data.js +5 -2
- package/lib/shared-data-source/setting.js +6 -4
- package/lib/type.d.ts +53 -0
- package/lib/ui-manager.d.ts +3 -2
- package/lib/ui-manager.js +6 -4
- package/lib/ui-scene.js +59 -44
- package/lib/utilities/constant.d.ts +8 -1
- package/lib/utilities/constant.js +7 -0
- package/lib/utilities/logger.d.ts +4 -0
- package/lib/utilities/logger.js +8 -1
- package/lib/utilities/renderer-event.d.ts +3 -0
- package/lib/utilities/renderer-event.js +14 -1
- package/lib/utilities/screen.js +2 -1
- package/lib/utilities/tools.d.ts +18 -1
- package/lib/utilities/tools.js +48 -2
- package/package.json +6 -6
- package/public/assets/cursors/fcr_whiteboard_input.ico +0 -0
- package/public/assets/cursors/fcr_whiteboard_pen.ico +0 -0
- package/public/assets/cursors/fcr_whiteboard_shape_-straightline.ico +0 -0
- package/public/assets/cursors/fcr_whiteboard_shape_arrow.ico +0 -0
- package/public/assets/cursors/fcr_whiteboard_shape_circle.ico +0 -0
- package/public/assets/cursors/fcr_whiteboard_shape_rectangle.ico +0 -0
- package/public/assets/cursors/fcr_whiteboard_shape_triangle.ico +0 -0
- package/public/assets/fcr_chat_reddot.svg +3 -3
- package/public/assets/fcr_grid_big.svg +1 -1
- package/public/assets/fcr_leave2.svg +14 -14
- package/public/assets/fcr_listontop_big.svg +1 -1
- package/public/assets/step-gradient.svg +1 -1
- package/public/fragment.html +10 -0
- package/public/index.html +3 -1
- package/lib/shared-data-source/screen-share-data-source.d.ts +0 -37
|
@@ -43,25 +43,19 @@ require("core-js/modules/es.array.for-each.js");
|
|
|
43
43
|
require("core-js/modules/es.array.includes.js");
|
|
44
44
|
require("core-js/modules/es.array.iterator.js");
|
|
45
45
|
require("core-js/modules/es.array.push.js");
|
|
46
|
-
require("core-js/modules/es.array.some.js");
|
|
47
|
-
require("core-js/modules/es.date.to-json.js");
|
|
48
46
|
require("core-js/modules/es.function.bind.js");
|
|
49
|
-
require("core-js/modules/es.json.stringify.js");
|
|
50
47
|
require("core-js/modules/es.object.to-string.js");
|
|
51
48
|
require("core-js/modules/es.promise.js");
|
|
52
|
-
require("core-js/modules/es.promise.finally.js");
|
|
53
|
-
require("core-js/modules/es.string.includes.js");
|
|
54
49
|
require("core-js/modules/es.string.iterator.js");
|
|
50
|
+
require("core-js/modules/es.string.starts-with.js");
|
|
55
51
|
require("core-js/modules/es.weak-map.js");
|
|
56
52
|
require("core-js/modules/esnext.async-iterator.filter.js");
|
|
57
53
|
require("core-js/modules/esnext.async-iterator.find.js");
|
|
58
54
|
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
59
|
-
require("core-js/modules/esnext.async-iterator.some.js");
|
|
60
55
|
require("core-js/modules/esnext.iterator.constructor.js");
|
|
61
56
|
require("core-js/modules/esnext.iterator.filter.js");
|
|
62
57
|
require("core-js/modules/esnext.iterator.find.js");
|
|
63
58
|
require("core-js/modules/esnext.iterator.for-each.js");
|
|
64
|
-
require("core-js/modules/esnext.iterator.some.js");
|
|
65
59
|
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
66
60
|
require("core-js/modules/esnext.weak-map.emplace.js");
|
|
67
61
|
require("core-js/modules/web.dom-collections.for-each.js");
|
|
@@ -73,26 +67,21 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
|
|
|
73
67
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
74
68
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
75
69
|
var _fcrCore = require("fcr-core");
|
|
76
|
-
var _rendererEvent = require("../../utilities/renderer-event");
|
|
77
|
-
var _types = require("fcr-core/lib/room-control/whiteboard-control/types");
|
|
78
70
|
var _env = require("agora-foundation/lib/utilities/env");
|
|
79
71
|
var _type = require("agora-rte-sdk/lib/core/rtc/type");
|
|
80
|
-
var _type2 = require("agora-rte-sdk/lib/core/scene/type");
|
|
81
|
-
var _type3 = require("agora-rte-sdk/lib/type");
|
|
82
72
|
var _shareAudio = require("agora-ui-foundation/lib/components/room-screen-share-state-bar/share-audio");
|
|
83
73
|
var _mobx = require("mobx");
|
|
84
74
|
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
85
75
|
var _decorator = require("agora-foundation/lib/decorator");
|
|
86
|
-
var _tools = require("../../utilities/tools");
|
|
87
76
|
var _react = require("react");
|
|
88
|
-
var
|
|
77
|
+
var _type2 = require("agora-ui-foundation/lib/components/icon/type");
|
|
89
78
|
var _renderer = require("../../utilities/renderer");
|
|
90
79
|
var _screenCapturePermission = require("../../utilities/screen-capture-permission");
|
|
91
80
|
var _constant = require("../../utilities/constant");
|
|
92
81
|
var _logger = require("../../utilities/logger");
|
|
93
82
|
var _parameters = require("../../utilities/parameters");
|
|
94
83
|
var _ShareScreenStore;
|
|
95
|
-
var _initProto,
|
|
84
|
+
var _initProto, _init_boardOwnerUser, _handleChooseScreenDecs, _init_handleChooseScreen, _setShareWithAudioStateDecs, _hasLoopbackDeviceDecs, _setShareAudioProcessingChannelDecs, _openRelaunchTipsDialogDecs, _startRenderSharePreviewDecs, _stopRenderSharePreviewDecs, _handleStopShareDecs, _handleStartShareDecs, _openShareScreenSelectionDecs, _closeShareScreenSelectionDecs, _setControlBarWindowIdDecs, _openVideoWindowDialogDecs, _closeControlBarDecs, _closeVideoWindowDialogDecs, _handleReplaceScreenDecs, _initControlbarDecs, _ref;
|
|
96
85
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
97
86
|
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
98
87
|
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
@@ -104,15 +93,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
104
93
|
function _setFunctionName(e, t, n) { "symbol" == _typeof(t) && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; }
|
|
105
94
|
function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? _typeof(e) : "null")); return e; }
|
|
106
95
|
var _A = /*#__PURE__*/new WeakMap();
|
|
107
|
-
|
|
108
|
-
var _C = /*#__PURE__*/new WeakMap();
|
|
109
|
-
var _D = /*#__PURE__*/new WeakMap();
|
|
110
|
-
var _E = /*#__PURE__*/new WeakMap();
|
|
111
|
-
var _F = /*#__PURE__*/new WeakMap();
|
|
112
|
-
var _G = /*#__PURE__*/new WeakMap();
|
|
113
|
-
var _H = /*#__PURE__*/new WeakMap();
|
|
114
|
-
var _I = /*#__PURE__*/new WeakMap();
|
|
115
|
-
_ref = (_handleChooseScreenDecs = [_mobx.action, _mobx.action.bound], _setShareWithAudioStateDecs = [_mobx.action, _mobx.action.bound], _hasLoopbackDeviceDecs = [_mobx.action, _mobx.action.bound], _setShareAudioProcessingChannelDecs = [_mobx.action, _mobx.action.bound], _openRelaunchTipsDialogDecs = [_mobx.action, _mobx.action.bound], _startPreviewDecs = [_mobx.action, _mobx.action.bound], _handleStopShareDecs = [_mobx.action, _mobx.action.bound], _handleStartShareDecs = [_mobx.action, _mobx.action.bound], _startLoopbackDecs = [_mobx.action, _mobx.action.bound], _handleShareStartWithAudioDecs = [_mobx.action, _mobx.action.bound], _handleShareStopWithAudioDecs = [_mobx.action, _mobx.action.bound], _openShareScreenSelectionDecs = [_mobx.action, _mobx.action.bound], _closeShareScreenSelectionDecs = [_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], _setWithAudioStateDecs = [_mobx.action, _mobx.action.bound], _handleReplaceScreenDecs = [_mobx.action, _mobx.action.bound], _handleScreenCaptureStateUpdatedDecs = [_mobx.action, _mobx.action.bound], _setShareLockDecs = [_mobx.action, _mobx.action.bound], _handleStreamUpdateDecs = [_mobx.action, _mobx.action.bound], _initControlbarDecs = [_mobx.action, _mobx.action.bound], "logger");
|
|
96
|
+
_ref = (_handleChooseScreenDecs = [_mobx.action, _mobx.action.bound], _setShareWithAudioStateDecs = [_mobx.action, _mobx.action.bound], _hasLoopbackDeviceDecs = [_mobx.action, _mobx.action.bound], _setShareAudioProcessingChannelDecs = [_mobx.action, _mobx.action.bound], _openRelaunchTipsDialogDecs = [_mobx.action, _mobx.action.bound], _startRenderSharePreviewDecs = [_mobx.action, _mobx.action.bound], _stopRenderSharePreviewDecs = [_mobx.action, _mobx.action.bound], _handleStopShareDecs = [_mobx.action, _mobx.action.bound], _handleStartShareDecs = [_mobx.action, _mobx.action.bound], _openShareScreenSelectionDecs = [_mobx.action, _mobx.action.bound], _closeShareScreenSelectionDecs = [_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], _handleReplaceScreenDecs = [_mobx.action, _mobx.action.bound], _initControlbarDecs = [_mobx.action, _mobx.action.bound], "logger");
|
|
116
97
|
var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
117
98
|
function ShareScreenStore(_ref2) {
|
|
118
99
|
var _this = this;
|
|
@@ -125,48 +106,34 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
125
106
|
sharedMemberDataSource = _ref2.sharedMemberDataSource,
|
|
126
107
|
roomProvider = _ref2.roomProvider,
|
|
127
108
|
sharedConfigDataSource = _ref2.sharedConfigDataSource,
|
|
128
|
-
|
|
129
|
-
|
|
109
|
+
screenShareProvider = _ref2.screenShareProvider,
|
|
110
|
+
annotationProvider = _ref2.annotationProvider,
|
|
111
|
+
sharedScreenShareSharedDataSource = _ref2.sharedScreenShareSharedDataSource,
|
|
112
|
+
connectionProvider = _ref2.connectionProvider;
|
|
130
113
|
(0, _classCallCheck2["default"])(this, ShareScreenStore);
|
|
131
114
|
(0, _defineProperty2["default"])(this, _ref, (_initProto(this), (0, _logger.createLogger)({
|
|
132
115
|
prefix: 'ShareScreenStore'
|
|
133
116
|
})));
|
|
134
117
|
(0, _defineProperty2["default"])(this, "_disposers", []);
|
|
135
118
|
(0, _defineProperty2["default"])(this, "_controlBarWindowId", -1);
|
|
136
|
-
(0, _defineProperty2["default"])(this, "_currentShareStreamId", '');
|
|
137
119
|
(0, _defineProperty2["default"])(this, "_removeScreenStreamFailed", false);
|
|
138
|
-
(0, _defineProperty2["default"])(this, "
|
|
139
|
-
(0, _defineProperty2["default"])(this, "_previewDom", null);
|
|
140
|
-
(0, _defineProperty2["default"])(this, "_connectionObserver", {
|
|
141
|
-
onConnectionStateUpdated: function onConnectionStateUpdated(state) {
|
|
142
|
-
_this.connectionState = state;
|
|
143
|
-
}
|
|
144
|
-
});
|
|
120
|
+
(0, _defineProperty2["default"])(this, "_isOnline", true);
|
|
145
121
|
(0, _defineProperty2["default"])(this, "_roomObserver", {
|
|
146
122
|
onRoomClosed: this.handleStopShare,
|
|
147
123
|
onLeaveMainRoom: this.handleStopShare
|
|
148
124
|
});
|
|
149
|
-
(0, _defineProperty2["default"])(this, "_observer", {
|
|
150
|
-
onScreenCaptureStateUpdated: (0, _env.isElectron)() ? this._handleScreenCaptureStateUpdated : this._handleWebScreenCaptureStateUpdated
|
|
151
|
-
});
|
|
152
125
|
(0, _defineProperty2["default"])(this, "_uiEventObserver", {
|
|
153
126
|
onEvent: this._onUiEvent.bind(this)
|
|
154
127
|
});
|
|
155
|
-
(0, _defineProperty2["default"])(this, "
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
onStreamsRemoved: function onStreamsRemoved(_, events) {
|
|
160
|
-
return _this._handleStreamUpdate('remove', events);
|
|
161
|
-
},
|
|
162
|
-
onStreamsUpdated: function onStreamsUpdated(_, events) {
|
|
163
|
-
return _this._handleStreamUpdate('update', events);
|
|
164
|
-
}
|
|
128
|
+
(0, _defineProperty2["default"])(this, "_screenCaptureStateObserver", {
|
|
129
|
+
onScreenCaptureStopped: this._handleOnScreenCaptureStopped.bind(this),
|
|
130
|
+
onScreenShareReplaceBegin: this._handleOnScreenShareReplaceBegin.bind(this),
|
|
131
|
+
onScreenCaptureStarted: this._handleOnScreenCaptureStarted.bind(this)
|
|
165
132
|
});
|
|
166
133
|
(0, _defineProperty2["default"])(this, "_boardObserver", {
|
|
167
134
|
onActive: function onActive(ownerId) {
|
|
168
135
|
_this.handleStopShare();
|
|
169
|
-
|
|
136
|
+
_this._closeShareScreenComps();
|
|
170
137
|
_this._closeShareScreenSelection();
|
|
171
138
|
_this.boardOwnerUser = _this._userControl.getUser(ownerId);
|
|
172
139
|
},
|
|
@@ -174,37 +141,14 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
174
141
|
_this.boardOwnerUser = undefined;
|
|
175
142
|
}
|
|
176
143
|
});
|
|
177
|
-
(0, _defineProperty2["default"])(this, "_loopbackAudioSourceId", (0, _env.getPlatform)() === _env.FcrApplicationPlatform.MACOS && (0, _env.isElectron)() ? 'AgoraALD' : (0, _env.isElectron)() ? '' : 'default');
|
|
178
144
|
(0, _defineProperty2["default"])(this, "_shareSelectionDialogId", '');
|
|
179
145
|
(0, _defineProperty2["default"])(this, "_controlBarDialogId", '');
|
|
180
146
|
(0, _defineProperty2["default"])(this, "_videoWindowDialogId", '');
|
|
181
|
-
(
|
|
182
|
-
(0, _defineProperty2["default"])(this, "_screenTrack", null);
|
|
183
|
-
(0, _defineProperty2["default"])(this, "_shareAudioTrack", null);
|
|
184
|
-
(0, _defineProperty2["default"])(this, "_currentShareId", '');
|
|
185
|
-
(0, _defineProperty2["default"])(this, "_currentShareType", _type.AgoraRtcScreenCaptureType.SCREEN);
|
|
186
|
-
(0, _defineProperty2["default"])(this, "_isOnline", true);
|
|
187
|
-
_classPrivateFieldInitSpec(this, _A, _init_screenSharingState(this, _fcrCore.FcrMediaSourceState.CLOSE));
|
|
188
|
-
_classPrivateFieldInitSpec(this, _B, _init_applicationCaptureSources(this, []));
|
|
189
|
-
_classPrivateFieldInitSpec(this, _C, _init_screenCaptureSources(this, []));
|
|
190
|
-
_classPrivateFieldInitSpec(this, _D, _init_currentSelection(this, (0, _env.isElectron)() ? '' : 'default'));
|
|
191
|
-
_classPrivateFieldInitSpec(this, _E, _init_currentSelectionType(this, _type.AgoraRtcScreenCaptureType.WINDOW));
|
|
192
|
-
_classPrivateFieldInitSpec(this, _F, _init_shareWithAudio(this, !(0, _env.isElectron)()));
|
|
193
|
-
// electron 默认 false,web 默认 true
|
|
194
|
-
_classPrivateFieldInitSpec(this, _G, _init_boardOwnerUser(this, undefined));
|
|
195
|
-
_classPrivateFieldInitSpec(this, _H, _init_currentSelectionBounds(this, {
|
|
196
|
-
x: 0,
|
|
197
|
-
y: 0,
|
|
198
|
-
width: 0,
|
|
199
|
-
height: 0
|
|
200
|
-
}));
|
|
201
|
-
_classPrivateFieldInitSpec(this, _I, _init_connectionState(this, _fcrCore.FcrConnectionState.CONNECTED));
|
|
147
|
+
_classPrivateFieldInitSpec(this, _A, _init_boardOwnerUser(this, undefined));
|
|
202
148
|
(0, _defineProperty2["default"])(this, "handleChooseScreen", _init_handleChooseScreen(this, function (id) {
|
|
203
149
|
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _type.AgoraRtcScreenCaptureType.WINDOW;
|
|
204
150
|
var bounds = arguments.length > 2 ? arguments[2] : undefined;
|
|
205
|
-
_this.
|
|
206
|
-
_this.currentSelectionType = type;
|
|
207
|
-
_this.currentSelectionBounds = bounds;
|
|
151
|
+
_this._sharedScreenShareSharedDataSource.setCurrentSelection(id, type, bounds);
|
|
208
152
|
}));
|
|
209
153
|
this._deviceProvider = deviceProvider;
|
|
210
154
|
this._messageProvider = messageProvider;
|
|
@@ -213,18 +157,17 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
213
157
|
this._securityStore = privilegeProvider;
|
|
214
158
|
this._roomProvider = roomProvider;
|
|
215
159
|
this._sharedMemberDataSource = sharedMemberDataSource;
|
|
160
|
+
this._screenShareProvider = screenShareProvider;
|
|
161
|
+
this._annotationProvider = annotationProvider;
|
|
162
|
+
this._sharedScreenShareSharedDataSource = sharedScreenShareSharedDataSource;
|
|
216
163
|
this._connectionProvider = connectionProvider;
|
|
217
|
-
this._screenShareDataSource = screenShareDataSource;
|
|
218
|
-
this._streamControl = roomControl.getStreamControl();
|
|
219
164
|
this._userControl = roomControl.getUserControl();
|
|
220
|
-
this._boardControl = roomControl.getBoardControl();
|
|
165
|
+
this._boardControl = roomControl.getSharingControl().getBoardControl();
|
|
221
166
|
this._roomProvider.addObserver(this._roomObserver);
|
|
222
167
|
this._eventProvider.addObserver(this._uiEventObserver);
|
|
223
|
-
this._streamControl.addObserver(this._streamObserver);
|
|
224
168
|
this._boardControl.addObserver(this._boardObserver);
|
|
225
|
-
this.
|
|
169
|
+
this._screenShareProvider.addObserver(this._screenCaptureStateObserver);
|
|
226
170
|
this._addEventListeners();
|
|
227
|
-
this._syncShareStreamState();
|
|
228
171
|
if ((0, _parameters.getStartScreenSharing)(sharedConfigDataSource.creatorConfig.parameters)) {
|
|
229
172
|
var display = window.runtime.screen.getAllDisplays()[0];
|
|
230
173
|
this.handleStartShare(String(display.id), _type.AgoraRtcScreenCaptureType.SCREEN, false, _shareAudio.AudioProcessingChannel.MONO, display.bounds);
|
|
@@ -243,7 +186,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
243
186
|
}));
|
|
244
187
|
}
|
|
245
188
|
return (0, _createClass2["default"])(ShareScreenStore, [{
|
|
246
|
-
key: "
|
|
189
|
+
key: "boardOwnerUser",
|
|
247
190
|
get: function get() {
|
|
248
191
|
return _classPrivateFieldGet(_A, this);
|
|
249
192
|
},
|
|
@@ -251,108 +194,128 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
251
194
|
_classPrivateFieldSet(_A, this, v);
|
|
252
195
|
}
|
|
253
196
|
}, {
|
|
254
|
-
key: "
|
|
197
|
+
key: "currentShareStreamId",
|
|
255
198
|
get: function get() {
|
|
256
|
-
return
|
|
257
|
-
},
|
|
258
|
-
set: function set(v) {
|
|
259
|
-
_classPrivateFieldSet(_B, this, v);
|
|
199
|
+
return this._sharedScreenShareSharedDataSource.currentShareStreamId;
|
|
260
200
|
}
|
|
261
201
|
}, {
|
|
262
|
-
key: "
|
|
202
|
+
key: "screenTrack",
|
|
263
203
|
get: function get() {
|
|
264
|
-
return
|
|
265
|
-
},
|
|
266
|
-
set: function set(v) {
|
|
267
|
-
_classPrivateFieldSet(_C, this, v);
|
|
204
|
+
return this._sharedScreenShareSharedDataSource.screenTrack;
|
|
268
205
|
}
|
|
269
206
|
}, {
|
|
270
|
-
key: "
|
|
207
|
+
key: "currentShareType",
|
|
271
208
|
get: function get() {
|
|
272
|
-
return
|
|
273
|
-
},
|
|
274
|
-
set: function set(v) {
|
|
275
|
-
_classPrivateFieldSet(_D, this, v);
|
|
209
|
+
return this._sharedScreenShareSharedDataSource.currentShareType;
|
|
276
210
|
}
|
|
277
211
|
}, {
|
|
278
|
-
key: "
|
|
212
|
+
key: "localUser",
|
|
279
213
|
get: function get() {
|
|
280
|
-
return
|
|
281
|
-
},
|
|
282
|
-
set: function set(v) {
|
|
283
|
-
_classPrivateFieldSet(_E, this, v);
|
|
214
|
+
return this._sharedMemberDataSource.localUser;
|
|
284
215
|
}
|
|
285
216
|
}, {
|
|
286
|
-
key: "
|
|
217
|
+
key: "localUserRole",
|
|
287
218
|
get: function get() {
|
|
288
|
-
return
|
|
289
|
-
},
|
|
290
|
-
set: function set(v) {
|
|
291
|
-
_classPrivateFieldSet(_F, this, v);
|
|
219
|
+
return this._sharedMemberDataSource.localUserRole;
|
|
292
220
|
}
|
|
293
221
|
}, {
|
|
294
|
-
key: "
|
|
222
|
+
key: "isHost",
|
|
295
223
|
get: function get() {
|
|
296
|
-
return
|
|
297
|
-
},
|
|
298
|
-
set: function set(v) {
|
|
299
|
-
_classPrivateFieldSet(_G, this, v);
|
|
224
|
+
return this._sharedMemberDataSource.isLocalUserHost;
|
|
300
225
|
}
|
|
301
226
|
}, {
|
|
302
|
-
key: "
|
|
227
|
+
key: "supportEnumScreen",
|
|
303
228
|
get: function get() {
|
|
304
|
-
return
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
|
|
229
|
+
return this._deviceProvider.isCapabilitySupported(_fcrCore.FcrCapability.SCREEN_ENUMERATE);
|
|
230
|
+
}
|
|
231
|
+
}, {
|
|
232
|
+
key: "appWindowList",
|
|
233
|
+
get: function get() {
|
|
234
|
+
return this._sharedScreenShareSharedDataSource.appWindowList;
|
|
235
|
+
}
|
|
236
|
+
}, {
|
|
237
|
+
key: "displayList",
|
|
238
|
+
get: function get() {
|
|
239
|
+
return this._sharedScreenShareSharedDataSource.displayList;
|
|
308
240
|
}
|
|
309
241
|
}, {
|
|
310
242
|
key: "connectionState",
|
|
311
243
|
get: function get() {
|
|
312
|
-
return
|
|
313
|
-
},
|
|
314
|
-
set: function set(v) {
|
|
315
|
-
_classPrivateFieldSet(_I, this, v);
|
|
244
|
+
return this._sharedScreenShareSharedDataSource.connectionState;
|
|
316
245
|
}
|
|
317
246
|
}, {
|
|
318
|
-
key: "
|
|
247
|
+
key: "screenSharingState",
|
|
319
248
|
get: function get() {
|
|
320
|
-
return this.
|
|
249
|
+
return this._sharedScreenShareSharedDataSource.screenSharingState;
|
|
321
250
|
}
|
|
322
251
|
}, {
|
|
323
|
-
key: "
|
|
252
|
+
key: "applicationCaptureSources",
|
|
324
253
|
get: function get() {
|
|
325
|
-
return this.
|
|
254
|
+
return this._sharedScreenShareSharedDataSource.applicationCaptureSources;
|
|
326
255
|
}
|
|
327
256
|
}, {
|
|
328
|
-
key: "
|
|
257
|
+
key: "screenCaptureSources",
|
|
329
258
|
get: function get() {
|
|
330
|
-
return this.
|
|
259
|
+
return this._sharedScreenShareSharedDataSource.screenCaptureSources;
|
|
331
260
|
}
|
|
332
261
|
}, {
|
|
333
|
-
key: "
|
|
262
|
+
key: "currentShareAudioProcessingChannel",
|
|
334
263
|
get: function get() {
|
|
335
|
-
return this.
|
|
264
|
+
return this._sharedScreenShareSharedDataSource.currentShareAudioProcessingChannel;
|
|
336
265
|
}
|
|
337
266
|
}, {
|
|
338
|
-
key: "
|
|
267
|
+
key: "currentSelectionId",
|
|
339
268
|
get: function get() {
|
|
340
|
-
return this.
|
|
269
|
+
return this._sharedScreenShareSharedDataSource.currentSelectionId;
|
|
341
270
|
}
|
|
342
271
|
}, {
|
|
343
|
-
key: "
|
|
272
|
+
key: "currentSelectionType",
|
|
344
273
|
get: function get() {
|
|
345
|
-
return this.
|
|
274
|
+
return this._sharedScreenShareSharedDataSource.currentSelectionType;
|
|
346
275
|
}
|
|
347
276
|
}, {
|
|
348
|
-
key: "
|
|
277
|
+
key: "shareWithAudio",
|
|
349
278
|
get: function get() {
|
|
350
|
-
return this.
|
|
279
|
+
return this._sharedScreenShareSharedDataSource.shareWithAudio;
|
|
280
|
+
}
|
|
281
|
+
}, {
|
|
282
|
+
key: "currentSelectionBounds",
|
|
283
|
+
get: function get() {
|
|
284
|
+
return this._sharedScreenShareSharedDataSource.currentSelectionBounds;
|
|
285
|
+
}
|
|
286
|
+
}, {
|
|
287
|
+
key: "shareLock",
|
|
288
|
+
get: function get() {
|
|
289
|
+
return this._screenShareProvider.shareLock;
|
|
290
|
+
}
|
|
291
|
+
}, {
|
|
292
|
+
key: "currentShareId",
|
|
293
|
+
get: function get() {
|
|
294
|
+
return this._sharedScreenShareSharedDataSource.currentShareId;
|
|
295
|
+
}
|
|
296
|
+
}, {
|
|
297
|
+
key: "_handleOnScreenCaptureStopped",
|
|
298
|
+
value: function _handleOnScreenCaptureStopped() {
|
|
299
|
+
this.handleStopShare();
|
|
300
|
+
}
|
|
301
|
+
}, {
|
|
302
|
+
key: "_handleOnScreenCaptureStarted",
|
|
303
|
+
value: function _handleOnScreenCaptureStarted() {
|
|
304
|
+
this.prepareShareScreen();
|
|
305
|
+
}
|
|
306
|
+
}, {
|
|
307
|
+
key: "_hasScreenSharePermission",
|
|
308
|
+
value: function _hasScreenSharePermission() {
|
|
309
|
+
if (!this._securityStore.hasStartScreenSharePermission()) {
|
|
310
|
+
this._showToast((0, _i18n.transI18n)('fmt_screenshare_cohost_can_not_share_remind'), 'error');
|
|
311
|
+
return false;
|
|
312
|
+
}
|
|
313
|
+
return true;
|
|
351
314
|
}
|
|
352
315
|
}, {
|
|
353
316
|
key: "setShareWithAudioState",
|
|
354
317
|
value: function setShareWithAudioState(withAudio) {
|
|
355
|
-
this.
|
|
318
|
+
this._sharedScreenShareSharedDataSource.setShareWithAudio(withAudio);
|
|
356
319
|
}
|
|
357
320
|
}, {
|
|
358
321
|
key: "hasLoopbackDevice",
|
|
@@ -380,8 +343,8 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
380
343
|
}()
|
|
381
344
|
}, {
|
|
382
345
|
key: "setShareAudioProcessingChannel",
|
|
383
|
-
value: function setShareAudioProcessingChannel(
|
|
384
|
-
this.
|
|
346
|
+
value: function setShareAudioProcessingChannel(currentShareAudioProcessingChannel) {
|
|
347
|
+
this._sharedScreenShareSharedDataSource.setCurrentShareAudioProcessingChannel(currentShareAudioProcessingChannel);
|
|
385
348
|
}
|
|
386
349
|
}, {
|
|
387
350
|
key: "handlerBoardShareStop",
|
|
@@ -391,19 +354,18 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
391
354
|
}, {
|
|
392
355
|
key: "release",
|
|
393
356
|
value: function release() {
|
|
394
|
-
var _this$_screenTrack;
|
|
395
357
|
this._disposers.forEach(function (disposer) {
|
|
396
358
|
return disposer();
|
|
397
359
|
});
|
|
398
360
|
this._disposers = [];
|
|
399
|
-
this.
|
|
400
|
-
this._removeEventListeners();
|
|
361
|
+
this._closeShareScreenComps();
|
|
401
362
|
this._eventProvider.removeObserver(this._uiEventObserver);
|
|
402
|
-
this.
|
|
403
|
-
|
|
363
|
+
// this.screenTrack?.removeObserver(this._observer);
|
|
364
|
+
this._screenShareProvider.removeObserver(this._screenCaptureStateObserver);
|
|
365
|
+
this._screenShareProvider.release();
|
|
404
366
|
this._boardControl.removeObserver(this._boardObserver);
|
|
405
367
|
this._roomProvider.removeObserver(this._roomObserver);
|
|
406
|
-
this.
|
|
368
|
+
this._removeEventListeners();
|
|
407
369
|
}
|
|
408
370
|
}, {
|
|
409
371
|
key: "openRelaunchTipsDialog",
|
|
@@ -424,30 +386,20 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
424
386
|
});
|
|
425
387
|
}
|
|
426
388
|
}, {
|
|
427
|
-
key: "
|
|
428
|
-
value: function
|
|
429
|
-
this.
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
}, dom);
|
|
436
|
-
} else {
|
|
437
|
-
var _this$_screenTrack3;
|
|
438
|
-
(_this$_screenTrack3 = this._screenTrack) === null || _this$_screenTrack3 === void 0 || _this$_screenTrack3.stopPreview(dom);
|
|
439
|
-
this._previewDom = null;
|
|
440
|
-
}
|
|
389
|
+
key: "startRenderSharePreview",
|
|
390
|
+
value: function startRenderSharePreview(dom) {
|
|
391
|
+
this._screenShareProvider.startRenderSharePreview(dom);
|
|
392
|
+
}
|
|
393
|
+
}, {
|
|
394
|
+
key: "stopRenderSharePreview",
|
|
395
|
+
value: function stopRenderSharePreview(screenTrack) {
|
|
396
|
+
this._screenShareProvider.stopRenderSharePreview(screenTrack);
|
|
441
397
|
}
|
|
442
398
|
}, {
|
|
443
399
|
key: "handleStopShare",
|
|
444
400
|
value: function handleStopShare() {
|
|
445
|
-
|
|
446
|
-
this.
|
|
447
|
-
this._removeScreenStream();
|
|
448
|
-
this._previewDom && ((_this$_screenTrack4 = this._screenTrack) === null || _this$_screenTrack4 === void 0 ? void 0 : _this$_screenTrack4.stopPreview(this._previewDom));
|
|
449
|
-
(_this$_screenTrack5 = this._screenTrack) === null || _this$_screenTrack5 === void 0 || _this$_screenTrack5.stop();
|
|
450
|
-
this._currentShareId = '';
|
|
401
|
+
this._closeShareScreenComps();
|
|
402
|
+
this._screenShareProvider.stopShareScreen();
|
|
451
403
|
}
|
|
452
404
|
}, {
|
|
453
405
|
key: "prepareShareScreen",
|
|
@@ -479,7 +431,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
479
431
|
return _context2.abrupt("return");
|
|
480
432
|
case 3:
|
|
481
433
|
this.supportEnumScreen && this._openShareScreenSelection();
|
|
482
|
-
!(0, _env.isElectron)() && this.handleStartShare(this.
|
|
434
|
+
!(0, _env.isElectron)() && this.handleStartShare(this.currentSelectionId, _type.AgoraRtcScreenCaptureType.SCREEN, true, _shareAudio.AudioProcessingChannel.MONO, this.currentSelectionBounds);
|
|
483
435
|
case 5:
|
|
484
436
|
case "end":
|
|
485
437
|
return _context2.stop();
|
|
@@ -497,9 +449,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
497
449
|
var _handleStartShare = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(id, type, withAudio) {
|
|
498
450
|
var audioProcessingChannel,
|
|
499
451
|
bounds,
|
|
500
|
-
excludeWindows,
|
|
501
452
|
electronBounds,
|
|
502
|
-
screenTrack,
|
|
503
453
|
_args3 = arguments;
|
|
504
454
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
505
455
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -513,31 +463,40 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
513
463
|
this._showToast((0, _i18n.transI18n)('fmt_screenshare_toast_network_error_unable_start_screen_share'), 'error');
|
|
514
464
|
return _context3.abrupt("return", Promise.reject(false));
|
|
515
465
|
case 5:
|
|
516
|
-
excludeWindows = [];
|
|
517
466
|
if ((0, _env.isElectron)()) this._closeShareScreenSelection();
|
|
518
|
-
if (!
|
|
519
|
-
_context3.next =
|
|
467
|
+
if (!id.startsWith('whiteboard-')) {
|
|
468
|
+
_context3.next = 11;
|
|
520
469
|
break;
|
|
521
470
|
}
|
|
522
471
|
if (!(!this._securityStore.hasStartBoardPermission() && !this.isHost)) {
|
|
523
|
-
_context3.next =
|
|
472
|
+
_context3.next = 9;
|
|
524
473
|
break;
|
|
525
474
|
}
|
|
526
475
|
return _context3.abrupt("return", this._showToast((0, _i18n.transI18n)('fmt_screenshare_tips_hostprohibits'), 'error'));
|
|
527
|
-
case
|
|
476
|
+
case 9:
|
|
528
477
|
this._eventProvider.sendEvent(_constant.FcrUIAction.OPEN_WHITEBOARD);
|
|
529
478
|
return _context3.abrupt("return");
|
|
530
|
-
case
|
|
479
|
+
case 11:
|
|
531
480
|
electronBounds = (0, _env.isElectron)() ? window.runtime.screen.getDisplayNearestPoint(bounds) : null;
|
|
532
|
-
this.
|
|
481
|
+
this._sharedScreenShareSharedDataSource.setCurrentSelectionBounds((electronBounds === null || electronBounds === void 0 ? void 0 : electronBounds.bounds) || bounds);
|
|
533
482
|
if (!(this.screenSharingState === _fcrCore.FcrMediaSourceState.OPEN)) {
|
|
534
|
-
_context3.next =
|
|
483
|
+
_context3.next = 17;
|
|
535
484
|
break;
|
|
536
485
|
}
|
|
537
486
|
this._handleReplaceScreen(id, type, withAudio, audioProcessingChannel, bounds);
|
|
538
487
|
this._setShareLock(false);
|
|
539
488
|
return _context3.abrupt("return");
|
|
540
|
-
case
|
|
489
|
+
case 17:
|
|
490
|
+
this._annotationProvider.setCurrentShareInfo({
|
|
491
|
+
id: id,
|
|
492
|
+
type: type,
|
|
493
|
+
bounds: bounds
|
|
494
|
+
});
|
|
495
|
+
this._annotationProvider.setBoundsToAnnotationWindow({
|
|
496
|
+
id: id,
|
|
497
|
+
type: type,
|
|
498
|
+
bounds: bounds
|
|
499
|
+
});
|
|
541
500
|
this._eventProvider.sendEvent(_constant.FcrUIAction.SET_CURRENT_SHARE_SCREEN, {
|
|
542
501
|
id: id,
|
|
543
502
|
type: type,
|
|
@@ -545,61 +504,38 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
545
504
|
});
|
|
546
505
|
_context3.t0 = this.supportEnumScreen;
|
|
547
506
|
if (!_context3.t0) {
|
|
548
|
-
_context3.next =
|
|
507
|
+
_context3.next = 25;
|
|
549
508
|
break;
|
|
550
509
|
}
|
|
551
|
-
_context3.next =
|
|
510
|
+
_context3.next = 24;
|
|
552
511
|
return this._validateShareStart(id, type);
|
|
553
|
-
case 23:
|
|
554
|
-
_context3.t0 = !_context3.sent;
|
|
555
512
|
case 24:
|
|
513
|
+
_context3.t0 = !_context3.sent;
|
|
514
|
+
case 25:
|
|
556
515
|
if (!_context3.t0) {
|
|
557
|
-
_context3.next =
|
|
516
|
+
_context3.next = 27;
|
|
558
517
|
break;
|
|
559
518
|
}
|
|
560
519
|
return _context3.abrupt("return");
|
|
561
|
-
case
|
|
562
|
-
if (!this.
|
|
563
|
-
_context3.next =
|
|
520
|
+
case 27:
|
|
521
|
+
if (!this.shareLock) {
|
|
522
|
+
_context3.next = 29;
|
|
564
523
|
break;
|
|
565
524
|
}
|
|
566
525
|
return _context3.abrupt("return", this._showToast((0, _i18n.transI18n)('fmt_screenshare_tips_enablecollection'), 'error'));
|
|
567
|
-
case
|
|
526
|
+
case 29:
|
|
568
527
|
this._setShareLock(true);
|
|
569
|
-
this.
|
|
570
|
-
this._currentShareId = id;
|
|
571
|
-
this._currentShareType = type;
|
|
572
|
-
this.currentSelectionBounds = bounds;
|
|
573
|
-
if (withAudio) this._handleShareStartWithAudio();
|
|
528
|
+
this._sharedScreenShareSharedDataSource.setCurrentShareIdInfos(id, type, bounds);
|
|
574
529
|
if (this._hasScreenSharePermission()) {
|
|
575
|
-
_context3.next =
|
|
530
|
+
_context3.next = 34;
|
|
576
531
|
break;
|
|
577
532
|
}
|
|
578
533
|
this._setShareLock(false);
|
|
579
534
|
return _context3.abrupt("return");
|
|
580
|
-
case
|
|
581
|
-
this._initControlbar();
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
break;
|
|
585
|
-
}
|
|
586
|
-
_context3.next = 41;
|
|
587
|
-
return this._createScreenStream(id);
|
|
588
|
-
case 41:
|
|
589
|
-
_context3.next = 43;
|
|
590
|
-
return this._getExcludeWindows();
|
|
591
|
-
case 43:
|
|
592
|
-
excludeWindows = _context3.sent;
|
|
593
|
-
case 44:
|
|
594
|
-
screenTrack = this._deviceProvider.getScreenTrack(id);
|
|
595
|
-
this._screenTrack = screenTrack;
|
|
596
|
-
screenTrack.addObserver(this._observer);
|
|
597
|
-
screenTrack.start(type, {
|
|
598
|
-
// preview: true,
|
|
599
|
-
withAudio: withAudio,
|
|
600
|
-
excludeWindows: excludeWindows
|
|
601
|
-
});
|
|
602
|
-
case 48:
|
|
535
|
+
case 34:
|
|
536
|
+
this._initControlbar();
|
|
537
|
+
this._screenShareProvider.startShareScreen(id, type, withAudio, false);
|
|
538
|
+
case 36:
|
|
603
539
|
case "end":
|
|
604
540
|
return _context3.stop();
|
|
605
541
|
}
|
|
@@ -610,83 +546,41 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
610
546
|
}
|
|
611
547
|
return handleStartShare;
|
|
612
548
|
}()
|
|
613
|
-
}, {
|
|
614
|
-
key: "_startLoopback",
|
|
615
|
-
value: function () {
|
|
616
|
-
var _startLoopback2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4(withAudio) {
|
|
617
|
-
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
618
|
-
while (1) switch (_context4.prev = _context4.next) {
|
|
619
|
-
case 0:
|
|
620
|
-
this._setWithAudioState(withAudio);
|
|
621
|
-
if (withAudio) {
|
|
622
|
-
this._handleShareStartWithAudio();
|
|
623
|
-
} else {
|
|
624
|
-
this._handleShareStopWithAudio();
|
|
625
|
-
}
|
|
626
|
-
case 2:
|
|
627
|
-
case "end":
|
|
628
|
-
return _context4.stop();
|
|
629
|
-
}
|
|
630
|
-
}, _callee4, this);
|
|
631
|
-
}));
|
|
632
|
-
function _startLoopback(_x4) {
|
|
633
|
-
return _startLoopback2.apply(this, arguments);
|
|
634
|
-
}
|
|
635
|
-
return _startLoopback;
|
|
636
|
-
}()
|
|
637
|
-
}, {
|
|
638
|
-
key: "_handleShareStartWithAudio",
|
|
639
|
-
value: function _handleShareStartWithAudio() {
|
|
640
|
-
this._shareAudioTrack = this._deviceProvider.getLoopbackTrack(this._loopbackAudioSourceId);
|
|
641
|
-
if (this._deviceProvider.isCapabilitySupported(_fcrCore.FcrCapability.LOOPBACK_CAPTURE)) {
|
|
642
|
-
this._shareAudioTrack.start();
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
}, {
|
|
646
|
-
key: "_handleShareStopWithAudio",
|
|
647
|
-
value: function _handleShareStopWithAudio() {
|
|
648
|
-
if (!this._shareAudioTrack) {
|
|
649
|
-
return;
|
|
650
|
-
}
|
|
651
|
-
if (this._deviceProvider.isCapabilitySupported(_fcrCore.FcrCapability.LOOPBACK_CAPTURE)) {
|
|
652
|
-
this._shareAudioTrack.stop();
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
549
|
}, {
|
|
656
550
|
key: "_openShareScreenSelection",
|
|
657
551
|
value: function () {
|
|
658
|
-
var _openShareScreenSelection2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
552
|
+
var _openShareScreenSelection2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4() {
|
|
659
553
|
var _this4 = this;
|
|
660
554
|
var windowList, displayList;
|
|
661
|
-
return _regenerator["default"].wrap(function
|
|
662
|
-
while (1) switch (
|
|
555
|
+
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
556
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
663
557
|
case 0:
|
|
664
558
|
this._shareSelectionDialogId = this._dialogProvider.openDialog(_constant.FcrUIDialogKey.SHARE_SCREEN, 'screen-selection');
|
|
665
|
-
|
|
559
|
+
_context4.next = 3;
|
|
666
560
|
return this.appWindowList;
|
|
667
561
|
case 3:
|
|
668
|
-
windowList =
|
|
669
|
-
return !['AgoraHighLighter', 'Toast', 'Confirm'].includes(item.title) || item.isCurrent;
|
|
562
|
+
windowList = _context4.sent.filter(function (item) {
|
|
563
|
+
return !['AgoraHighLighter', 'Toast', 'Confirm', 'Annotation tool bar', 'Annotation', 'Video Window', 'Control Bar'].includes(item.title) || item.isCurrent;
|
|
670
564
|
});
|
|
671
|
-
|
|
565
|
+
_context4.next = 6;
|
|
672
566
|
return this.displayList;
|
|
673
567
|
case 6:
|
|
674
|
-
displayList =
|
|
568
|
+
displayList = _context4.sent;
|
|
675
569
|
(0, _mobx.runInAction)(function () {
|
|
676
|
-
_this4.
|
|
570
|
+
_this4._sharedScreenShareSharedDataSource.setApplicationCaptureSources(windowList.filter(function (item) {
|
|
677
571
|
return !item.isCurrent;
|
|
678
|
-
});
|
|
679
|
-
_this4.
|
|
572
|
+
}));
|
|
573
|
+
_this4._sharedScreenShareSharedDataSource.setScreenCaptureSources([{
|
|
680
574
|
title: (0, _i18n.transI18n)('fmt_share_options_whiteboard'),
|
|
681
575
|
id: "whiteboard-".concat(displayList[0].id),
|
|
682
|
-
image:
|
|
683
|
-
}].concat((0, _toConsumableArray2["default"])(displayList));
|
|
576
|
+
image: _type2.FcrIconType.FCR_WHITEBOARD2
|
|
577
|
+
}].concat((0, _toConsumableArray2["default"])(displayList)));
|
|
684
578
|
});
|
|
685
579
|
case 8:
|
|
686
580
|
case "end":
|
|
687
|
-
return
|
|
581
|
+
return _context4.stop();
|
|
688
582
|
}
|
|
689
|
-
},
|
|
583
|
+
}, _callee4, this);
|
|
690
584
|
}));
|
|
691
585
|
function _openShareScreenSelection() {
|
|
692
586
|
return _openShareScreenSelection2.apply(this, arguments);
|
|
@@ -725,315 +619,48 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
725
619
|
this._eventProvider.sendEvent(_constant.FcrUIAction.CLOSE_VIDEO_WINDOW);
|
|
726
620
|
}
|
|
727
621
|
}, {
|
|
728
|
-
key: "
|
|
729
|
-
value: function
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
this._streamControl.updatePublishPrivilegeOfStreams((0, _defineProperty2["default"])({}, this._currentShareStreamId, {
|
|
733
|
-
audioPrivilege: withAudio ? _fcrCore.FcrStreamPrivilegeOperation.HAS_PRIVILEGE : _fcrCore.FcrStreamPrivilegeOperation.NOPRIVILEGE,
|
|
734
|
-
videoPrivilege: _fcrCore.FcrStreamPrivilegeOperation.NOOPERATION
|
|
735
|
-
}));
|
|
622
|
+
key: "_handleOnScreenShareReplaceBegin",
|
|
623
|
+
value: function _handleOnScreenShareReplaceBegin(id, type, bounds) {
|
|
624
|
+
if ((0, _env.isElectron)()) {
|
|
625
|
+
this._initControlbar();
|
|
736
626
|
}
|
|
627
|
+
this._eventProvider.sendEvent(_constant.FcrUIAction.SET_CURRENT_SHARE_SCREEN, {
|
|
628
|
+
id: id,
|
|
629
|
+
type: type,
|
|
630
|
+
bounds: bounds
|
|
631
|
+
});
|
|
632
|
+
this._annotationProvider.setCurrentShareInfo({
|
|
633
|
+
id: id,
|
|
634
|
+
type: type,
|
|
635
|
+
bounds: bounds
|
|
636
|
+
});
|
|
637
|
+
this._annotationProvider.setBoundsToAnnotationWindow({
|
|
638
|
+
id: id,
|
|
639
|
+
type: type,
|
|
640
|
+
bounds: bounds
|
|
641
|
+
});
|
|
737
642
|
}
|
|
738
643
|
}, {
|
|
739
644
|
key: "_handleReplaceScreen",
|
|
740
645
|
value: function _handleReplaceScreen(id, type, withAudio) {
|
|
741
|
-
var _this5 = this;
|
|
742
646
|
var audioProcessingChannel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _shareAudio.AudioProcessingChannel.MONO;
|
|
743
647
|
var bounds = arguments.length > 4 ? arguments[4] : undefined;
|
|
744
|
-
|
|
745
|
-
if (this.shareWithAudio && !withAudio) {
|
|
746
|
-
this._handleShareStopWithAudio();
|
|
747
|
-
}
|
|
748
|
-
this.setShareWithAudioState(withAudio);
|
|
749
|
-
var screenTrack = this._screenTrack;
|
|
750
|
-
this._isReplaceScreen = true;
|
|
751
|
-
if (screenTrack) {
|
|
752
|
-
var observer = {
|
|
753
|
-
onScreenCaptureStateUpdated: function () {
|
|
754
|
-
var _onScreenCaptureStateUpdated = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6(sourceId, state) {
|
|
755
|
-
var newScreenTrack, excludeWindows;
|
|
756
|
-
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
|
757
|
-
while (1) switch (_context6.prev = _context6.next) {
|
|
758
|
-
case 0:
|
|
759
|
-
if (!(state === _fcrCore.FcrMediaSourceState.CLOSE)) {
|
|
760
|
-
_context6.next = 19;
|
|
761
|
-
break;
|
|
762
|
-
}
|
|
763
|
-
if ((0, _env.isElectron)()) {
|
|
764
|
-
_this5._initControlbar();
|
|
765
|
-
}
|
|
766
|
-
_this5._eventProvider.sendEvent(_constant.FcrUIAction.SET_CURRENT_SHARE_SCREEN, {
|
|
767
|
-
id: id,
|
|
768
|
-
type: type,
|
|
769
|
-
bounds: bounds
|
|
770
|
-
});
|
|
771
|
-
screenTrack.removeObserver(_this5._observer);
|
|
772
|
-
screenTrack.removeObserver(observer);
|
|
773
|
-
newScreenTrack = _this5._deviceProvider.getScreenTrack(id);
|
|
774
|
-
if (withAudio) {
|
|
775
|
-
_this5._handleShareStartWithAudio();
|
|
776
|
-
}
|
|
777
|
-
_this5._screenTrack = newScreenTrack;
|
|
778
|
-
excludeWindows = [];
|
|
779
|
-
if (!(0, _env.isElectron)()) {
|
|
780
|
-
_context6.next = 13;
|
|
781
|
-
break;
|
|
782
|
-
}
|
|
783
|
-
_context6.next = 12;
|
|
784
|
-
return _this5._getExcludeWindows();
|
|
785
|
-
case 12:
|
|
786
|
-
excludeWindows = _context6.sent;
|
|
787
|
-
case 13:
|
|
788
|
-
newScreenTrack.addObserver(_this5._observer);
|
|
789
|
-
newScreenTrack.start(type, {
|
|
790
|
-
// preview: true,
|
|
791
|
-
withAudio: withAudio,
|
|
792
|
-
excludeWindows: excludeWindows
|
|
793
|
-
});
|
|
794
|
-
if (_this5._currentShareStreamId) {
|
|
795
|
-
_this5._streamControl.bindLocalStreams([{
|
|
796
|
-
streamId: _this5._currentShareStreamId,
|
|
797
|
-
audioSourceId: _this5._loopbackAudioSourceId,
|
|
798
|
-
videoSourceId: id
|
|
799
|
-
}]);
|
|
800
|
-
}
|
|
801
|
-
_this5._currentShareId = id;
|
|
802
|
-
_this5._currentShareType = type;
|
|
803
|
-
_this5.currentSelectionBounds = bounds;
|
|
804
|
-
case 19:
|
|
805
|
-
case "end":
|
|
806
|
-
return _context6.stop();
|
|
807
|
-
}
|
|
808
|
-
}, _callee6);
|
|
809
|
-
}));
|
|
810
|
-
function onScreenCaptureStateUpdated(_x5, _x6) {
|
|
811
|
-
return _onScreenCaptureStateUpdated.apply(this, arguments);
|
|
812
|
-
}
|
|
813
|
-
return onScreenCaptureStateUpdated;
|
|
814
|
-
}()
|
|
815
|
-
};
|
|
816
|
-
screenTrack.addObserver(observer);
|
|
817
|
-
screenTrack.stop();
|
|
818
|
-
this._previewDom && screenTrack.stopPreview(this._previewDom);
|
|
819
|
-
}
|
|
648
|
+
this._screenShareProvider.replaceScreenShare(id, type, withAudio, bounds);
|
|
820
649
|
}
|
|
821
|
-
}, {
|
|
822
|
-
key: "_createScreenStream",
|
|
823
|
-
value: function () {
|
|
824
|
-
var _createScreenStream2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7(videoSourceId) {
|
|
825
|
-
var _this6 = this;
|
|
826
|
-
var audioSourceId, streamId;
|
|
827
|
-
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
|
828
|
-
while (1) switch (_context7.prev = _context7.next) {
|
|
829
|
-
case 0:
|
|
830
|
-
if (this._securityStore.hasStartScreenSharePermission()) {
|
|
831
|
-
_context7.next = 3;
|
|
832
|
-
break;
|
|
833
|
-
}
|
|
834
|
-
this._showToast((0, _i18n.transI18n)('fmt_screenshare_cohost_can_not_share_remind'), 'error');
|
|
835
|
-
return _context7.abrupt("return", this.handleStopShare());
|
|
836
|
-
case 3:
|
|
837
|
-
audioSourceId = this._loopbackAudioSourceId;
|
|
838
|
-
_context7.next = 6;
|
|
839
|
-
return this._streamControl.addLocalScreenStream({
|
|
840
|
-
streamType: _type2.AgoraRteMediaStreamType.BOTH,
|
|
841
|
-
videoSourceId: videoSourceId,
|
|
842
|
-
audioSourceId: audioSourceId
|
|
843
|
-
})["finally"](function () {
|
|
844
|
-
_this6._setShareLock(false);
|
|
845
|
-
});
|
|
846
|
-
case 6:
|
|
847
|
-
streamId = _context7.sent;
|
|
848
|
-
this._currentShareStreamId = streamId;
|
|
849
|
-
case 8:
|
|
850
|
-
case "end":
|
|
851
|
-
return _context7.stop();
|
|
852
|
-
}
|
|
853
|
-
}, _callee7, this);
|
|
854
|
-
}));
|
|
855
|
-
function _createScreenStream(_x7) {
|
|
856
|
-
return _createScreenStream2.apply(this, arguments);
|
|
857
|
-
}
|
|
858
|
-
return _createScreenStream;
|
|
859
|
-
}()
|
|
860
|
-
}, {
|
|
861
|
-
key: "_handleWebScreenCaptureStateUpdated",
|
|
862
|
-
value: function () {
|
|
863
|
-
var _handleWebScreenCaptureStateUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee8(sourceId, state) {
|
|
864
|
-
var _this$_screenTrack6;
|
|
865
|
-
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
|
866
|
-
while (1) switch (_context8.prev = _context8.next) {
|
|
867
|
-
case 0:
|
|
868
|
-
this.screenSharingState = state;
|
|
869
|
-
if (state === _fcrCore.FcrMediaSourceState.OPEN) {
|
|
870
|
-
this._setShareLock(true);
|
|
871
|
-
this._createScreenStream(this._currentShareId);
|
|
872
|
-
}
|
|
873
|
-
if (state === _fcrCore.FcrMediaSourceState.CLOSE) {
|
|
874
|
-
this._setShareLock(false);
|
|
875
|
-
this._isReplaceScreen ? (_this$_screenTrack6 = this._screenTrack) === null || _this$_screenTrack6 === void 0 ? void 0 : _this$_screenTrack6.stop() : this.handleStopShare();
|
|
876
|
-
}
|
|
877
|
-
if (state === _fcrCore.FcrMediaSourceState.ERROR) {
|
|
878
|
-
this._setShareLock(false);
|
|
879
|
-
this._isReplaceScreen = false;
|
|
880
|
-
}
|
|
881
|
-
case 4:
|
|
882
|
-
case "end":
|
|
883
|
-
return _context8.stop();
|
|
884
|
-
}
|
|
885
|
-
}, _callee8, this);
|
|
886
|
-
}));
|
|
887
|
-
function _handleWebScreenCaptureStateUpdated(_x8, _x9) {
|
|
888
|
-
return _handleWebScreenCaptureStateUpdated2.apply(this, arguments);
|
|
889
|
-
}
|
|
890
|
-
return _handleWebScreenCaptureStateUpdated;
|
|
891
|
-
}()
|
|
892
|
-
}, {
|
|
893
|
-
key: "_handleScreenCaptureStateUpdated",
|
|
894
|
-
value: function () {
|
|
895
|
-
var _handleScreenCaptureStateUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee9(sourceId, state) {
|
|
896
|
-
var _this$_screenTrack7, _this$_screenTrack8, _this$_screenTrack9;
|
|
897
|
-
return _regenerator["default"].wrap(function _callee9$(_context9) {
|
|
898
|
-
while (1) switch (_context9.prev = _context9.next) {
|
|
899
|
-
case 0:
|
|
900
|
-
if (state === _fcrCore.FcrMediaSourceState.CLOSE) {
|
|
901
|
-
this._previewDom && ((_this$_screenTrack7 = this._screenTrack) === null || _this$_screenTrack7 === void 0 ? void 0 : _this$_screenTrack7.stopPreview(this._previewDom));
|
|
902
|
-
(_this$_screenTrack8 = this._screenTrack) === null || _this$_screenTrack8 === void 0 || _this$_screenTrack8.removeObserver(this._observer);
|
|
903
|
-
this._isReplaceScreen ? (_this$_screenTrack9 = this._screenTrack) === null || _this$_screenTrack9 === void 0 ? void 0 : _this$_screenTrack9.stop() : this.handleStopShare();
|
|
904
|
-
this._isReplaceScreen = false;
|
|
905
|
-
}
|
|
906
|
-
if (!(state === _fcrCore.FcrMediaSourceState.ERROR)) {
|
|
907
|
-
_context9.next = 6;
|
|
908
|
-
break;
|
|
909
|
-
}
|
|
910
|
-
this.handleStopShare();
|
|
911
|
-
this.screenSharingState = _fcrCore.FcrMediaSourceState.CLOSE;
|
|
912
|
-
this._isReplaceScreen = false;
|
|
913
|
-
return _context9.abrupt("return");
|
|
914
|
-
case 6:
|
|
915
|
-
this.screenSharingState = state;
|
|
916
|
-
case 7:
|
|
917
|
-
case "end":
|
|
918
|
-
return _context9.stop();
|
|
919
|
-
}
|
|
920
|
-
}, _callee9, this);
|
|
921
|
-
}));
|
|
922
|
-
function _handleScreenCaptureStateUpdated(_x10, _x11) {
|
|
923
|
-
return _handleScreenCaptureStateUpdated2.apply(this, arguments);
|
|
924
|
-
}
|
|
925
|
-
return _handleScreenCaptureStateUpdated;
|
|
926
|
-
}()
|
|
927
650
|
}, {
|
|
928
651
|
key: "_setShareLock",
|
|
929
652
|
value: function _setShareLock(lock) {
|
|
930
|
-
this.
|
|
653
|
+
this._screenShareProvider.setShareLock(lock);
|
|
931
654
|
}
|
|
932
655
|
}, {
|
|
933
|
-
key: "
|
|
934
|
-
value: function
|
|
656
|
+
key: "_closeShareScreenComps",
|
|
657
|
+
value: function _closeShareScreenComps() {
|
|
935
658
|
if ((0, _env.isElectron)()) {
|
|
936
659
|
this._closeControlBar();
|
|
937
660
|
this._closeVideoWindowDialog();
|
|
938
661
|
window.runtime.browserWindow.show();
|
|
939
662
|
}
|
|
940
663
|
}
|
|
941
|
-
}, {
|
|
942
|
-
key: "_removeScreenStream",
|
|
943
|
-
value: function () {
|
|
944
|
-
var _removeScreenStream2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee10() {
|
|
945
|
-
var streamId, _this$_streamControl;
|
|
946
|
-
return _regenerator["default"].wrap(function _callee10$(_context10) {
|
|
947
|
-
while (1) switch (_context10.prev = _context10.next) {
|
|
948
|
-
case 0:
|
|
949
|
-
streamId = this._currentShareStreamId;
|
|
950
|
-
if (streamId) {
|
|
951
|
-
_context10.next = 3;
|
|
952
|
-
break;
|
|
953
|
-
}
|
|
954
|
-
return _context10.abrupt("return");
|
|
955
|
-
case 3:
|
|
956
|
-
_context10.prev = 3;
|
|
957
|
-
_context10.next = 6;
|
|
958
|
-
return (_this$_streamControl = this._streamControl) === null || _this$_streamControl === void 0 ? void 0 : _this$_streamControl.removeScreenStream();
|
|
959
|
-
case 6:
|
|
960
|
-
this._currentShareStreamId = '';
|
|
961
|
-
_context10.next = 13;
|
|
962
|
-
break;
|
|
963
|
-
case 9:
|
|
964
|
-
_context10.prev = 9;
|
|
965
|
-
_context10.t0 = _context10["catch"](3);
|
|
966
|
-
this._removeScreenStreamFailed = true;
|
|
967
|
-
this.logger.error('removeScreenStream error', _context10.t0);
|
|
968
|
-
case 13:
|
|
969
|
-
case "end":
|
|
970
|
-
return _context10.stop();
|
|
971
|
-
}
|
|
972
|
-
}, _callee10, this, [[3, 9]]);
|
|
973
|
-
}));
|
|
974
|
-
function _removeScreenStream() {
|
|
975
|
-
return _removeScreenStream2.apply(this, arguments);
|
|
976
|
-
}
|
|
977
|
-
return _removeScreenStream;
|
|
978
|
-
}()
|
|
979
|
-
}, {
|
|
980
|
-
key: "_syncShareStreamState",
|
|
981
|
-
value: function _syncShareStreamState() {
|
|
982
|
-
var _this$_streamControl$2,
|
|
983
|
-
_this7 = this;
|
|
984
|
-
var currentShareStreamId = this._currentShareStreamId || ((_this$_streamControl$2 = this._streamControl.getStreamList().find(function (stream) {
|
|
985
|
-
return stream.videoSourceType === _type3.AgoraRteVideoSourceType.SCREEN && stream.owner.userId === _this7.localUser.userId;
|
|
986
|
-
})) === null || _this$_streamControl$2 === void 0 ? void 0 : _this$_streamControl$2.streamId);
|
|
987
|
-
if (this.screenSharingState !== _fcrCore.FcrMediaSourceState.OPEN && currentShareStreamId) {
|
|
988
|
-
this.handleStopShare();
|
|
989
|
-
}
|
|
990
|
-
}
|
|
991
|
-
}, {
|
|
992
|
-
key: "_isStoppedFor",
|
|
993
|
-
value: function _isStoppedFor(events, reason, ownerIsMe) {
|
|
994
|
-
var _this8 = this;
|
|
995
|
-
return events && events.find(function (event) {
|
|
996
|
-
var _event$cause;
|
|
997
|
-
var condition = ownerIsMe ? event.modifiedStream.owner.userId === _this8.localUser.userId : event.modifiedStream.owner.userId !== _this8.localUser.userId;
|
|
998
|
-
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) === reason && condition;
|
|
999
|
-
});
|
|
1000
|
-
}
|
|
1001
|
-
}, {
|
|
1002
|
-
key: "_handleStreamUpdate",
|
|
1003
|
-
value: function _handleStreamUpdate(process, events) {
|
|
1004
|
-
var _this$_screenTrack10,
|
|
1005
|
-
_this9 = this;
|
|
1006
|
-
var isClosedByOther = this._isStoppedFor(events, _types.FcrBoardInactiveReason.CLOSE);
|
|
1007
|
-
var isClosed = this._isStoppedFor(events, _types.FcrBoardInactiveReason.CLOSE, false);
|
|
1008
|
-
var isSeizedByOther = this._isStoppedFor(events, _types.FcrBoardInactiveReason.SEIZE);
|
|
1009
|
-
var operatorUser = (isSeizedByOther === null || isSeizedByOther === void 0 ? void 0 : isSeizedByOther.operatorUser) || (isClosedByOther === null || isClosedByOther === void 0 ? void 0 : isClosedByOther.operatorUser);
|
|
1010
|
-
var ownerUser = (isSeizedByOther === null || isSeizedByOther === void 0 ? void 0 : isSeizedByOther.modifiedStream.owner) || (isClosedByOther === null || isClosedByOther === void 0 ? void 0 : isClosedByOther.modifiedStream.owner);
|
|
1011
|
-
var selfOperated = (operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userId) === this.localUser.userId;
|
|
1012
|
-
var isMyOwnShare = this.localUser.userId === (ownerUser === null || ownerUser === void 0 ? void 0 : ownerUser.userId);
|
|
1013
|
-
(isSeizedByOther || isClosedByOther) && !selfOperated && ((_this$_screenTrack10 = this._screenTrack) === null || _this$_screenTrack10 === void 0 ? void 0 : _this$_screenTrack10.stop());
|
|
1014
|
-
isClosedByOther && !selfOperated && isMyOwnShare && this._eventProvider.sendEvent(_constant.FcrUIAction.SHOW_TOAST, {
|
|
1015
|
-
message: (0, _i18n.transI18n)('fmt_share_tips_sharingdisabled')
|
|
1016
|
-
});
|
|
1017
|
-
switch (process) {
|
|
1018
|
-
case 'remove':
|
|
1019
|
-
if (events.some(function (event) {
|
|
1020
|
-
return event.modifiedStream.videoSourceType === _type3.AgoraRteVideoSourceType.SCREEN && event.modifiedStream.owner.userId === _this9.localUser.userId;
|
|
1021
|
-
})) {
|
|
1022
|
-
var _this$_screenTrack11;
|
|
1023
|
-
if (!(0, _env.isElectron)() && this._isReplaceScreen) {
|
|
1024
|
-
this._isReplaceScreen = false;
|
|
1025
|
-
return;
|
|
1026
|
-
} // web 下如果是替换的逻辑,不需要关闭分享
|
|
1027
|
-
(_this$_screenTrack11 = this._screenTrack) === null || _this$_screenTrack11 === void 0 || _this$_screenTrack11.stop();
|
|
1028
|
-
}
|
|
1029
|
-
if (isClosed) {
|
|
1030
|
-
this._eventProvider.sendEvent(_constant.FcrUIAction.SHOW_TOAST, {
|
|
1031
|
-
message: (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_stopped')
|
|
1032
|
-
});
|
|
1033
|
-
}
|
|
1034
|
-
break;
|
|
1035
|
-
}
|
|
1036
|
-
}
|
|
1037
664
|
}, {
|
|
1038
665
|
key: "_addEventListeners",
|
|
1039
666
|
value: function _addEventListeners() {
|
|
@@ -1051,7 +678,6 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1051
678
|
value: function _handleOnline() {
|
|
1052
679
|
this._isOnline = true;
|
|
1053
680
|
this.logger.info('ononline');
|
|
1054
|
-
this._syncShareStreamState();
|
|
1055
681
|
}
|
|
1056
682
|
}, {
|
|
1057
683
|
key: "_handleOffline",
|
|
@@ -1062,42 +688,40 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1062
688
|
}, {
|
|
1063
689
|
key: "_onUiEvent",
|
|
1064
690
|
value: function () {
|
|
1065
|
-
var _onUiEvent2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1066
|
-
return _regenerator["default"].wrap(function
|
|
1067
|
-
while (1) switch (
|
|
691
|
+
var _onUiEvent2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5(event, params) {
|
|
692
|
+
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
693
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
1068
694
|
case 0:
|
|
1069
|
-
|
|
1070
|
-
|
|
695
|
+
_context5.t0 = event;
|
|
696
|
+
_context5.next = _context5.t0 === _constant.FcrUIAction.START_SHARE_SCREEN ? 3 : _context5.t0 === _constant.FcrUIAction.STOP_SCREEN_CAPTURE ? 5 : _context5.t0 === _constant.FcrUIAction.ENGINE_RECONNECTED ? 7 : _context5.t0 === _constant.FcrUIAction.STOP_SHARE_SCREEN ? 9 : _context5.t0 === _constant.FcrUIAction.SET_SHARE_WITH_AUDIO ? 11 : _context5.t0 === _constant.FcrUIAction.OPEN_TOP_VIDEO_WINDOW ? 13 : 15;
|
|
1071
697
|
break;
|
|
1072
698
|
case 3:
|
|
1073
699
|
this.prepareShareScreen();
|
|
1074
|
-
return
|
|
700
|
+
return _context5.abrupt("break", 15);
|
|
1075
701
|
case 5:
|
|
1076
|
-
this.
|
|
1077
|
-
|
|
1078
|
-
return _context11.abrupt("break", 15);
|
|
702
|
+
this.handleStopShare();
|
|
703
|
+
return _context5.abrupt("break", 15);
|
|
1079
704
|
case 7:
|
|
1080
705
|
if (this._removeScreenStreamFailed) {
|
|
1081
|
-
this.
|
|
1082
|
-
this._removeScreenStreamFailed = false;
|
|
706
|
+
this._removeScreenStreamFailed = !this._screenShareProvider.removeScreenStream();
|
|
1083
707
|
}
|
|
1084
|
-
return
|
|
708
|
+
return _context5.abrupt("break", 15);
|
|
1085
709
|
case 9:
|
|
1086
710
|
this.handleStopShare();
|
|
1087
|
-
return
|
|
711
|
+
return _context5.abrupt("break", 15);
|
|
1088
712
|
case 11:
|
|
1089
|
-
this.
|
|
1090
|
-
return
|
|
713
|
+
this._screenShareProvider.toggleScreenshareWithAudio(params.withAudio);
|
|
714
|
+
return _context5.abrupt("break", 15);
|
|
1091
715
|
case 13:
|
|
1092
716
|
this._openVideoWindowDialog();
|
|
1093
|
-
return
|
|
717
|
+
return _context5.abrupt("break", 15);
|
|
1094
718
|
case 15:
|
|
1095
719
|
case "end":
|
|
1096
|
-
return
|
|
720
|
+
return _context5.stop();
|
|
1097
721
|
}
|
|
1098
|
-
},
|
|
722
|
+
}, _callee5, this);
|
|
1099
723
|
}));
|
|
1100
|
-
function _onUiEvent(
|
|
724
|
+
function _onUiEvent(_x4, _x5) {
|
|
1101
725
|
return _onUiEvent2.apply(this, arguments);
|
|
1102
726
|
}
|
|
1103
727
|
return _onUiEvent;
|
|
@@ -1115,35 +739,35 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1115
739
|
}, {
|
|
1116
740
|
key: "_validateWindow",
|
|
1117
741
|
value: function () {
|
|
1118
|
-
var _validateWindow2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
742
|
+
var _validateWindow2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6(id) {
|
|
1119
743
|
var windows, window;
|
|
1120
|
-
return _regenerator["default"].wrap(function
|
|
1121
|
-
while (1) switch (
|
|
744
|
+
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
|
745
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
1122
746
|
case 0:
|
|
1123
|
-
|
|
747
|
+
_context6.next = 2;
|
|
1124
748
|
return this.appWindowList;
|
|
1125
749
|
case 2:
|
|
1126
|
-
windows =
|
|
750
|
+
windows = _context6.sent;
|
|
1127
751
|
window = windows.filter(function (item) {
|
|
1128
752
|
return item.title !== 'AgoraHighLighter' && item.title !== 'Development HTML';
|
|
1129
753
|
}).find(function (item) {
|
|
1130
754
|
return item.id === id;
|
|
1131
755
|
});
|
|
1132
756
|
if (window) {
|
|
1133
|
-
|
|
757
|
+
_context6.next = 7;
|
|
1134
758
|
break;
|
|
1135
759
|
}
|
|
1136
760
|
this._showToast((0, _i18n.transI18n)('fmt_screenshare_tips_faild_reselect'), 'error');
|
|
1137
|
-
return
|
|
761
|
+
return _context6.abrupt("return", false);
|
|
1138
762
|
case 7:
|
|
1139
|
-
return
|
|
763
|
+
return _context6.abrupt("return", true);
|
|
1140
764
|
case 8:
|
|
1141
765
|
case "end":
|
|
1142
|
-
return
|
|
766
|
+
return _context6.stop();
|
|
1143
767
|
}
|
|
1144
|
-
},
|
|
768
|
+
}, _callee6, this);
|
|
1145
769
|
}));
|
|
1146
|
-
function _validateWindow(
|
|
770
|
+
function _validateWindow(_x6) {
|
|
1147
771
|
return _validateWindow2.apply(this, arguments);
|
|
1148
772
|
}
|
|
1149
773
|
return _validateWindow;
|
|
@@ -1151,32 +775,32 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1151
775
|
}, {
|
|
1152
776
|
key: "_validateDisplay",
|
|
1153
777
|
value: function () {
|
|
1154
|
-
var _validateDisplay2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
778
|
+
var _validateDisplay2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7(id) {
|
|
1155
779
|
var displayList;
|
|
1156
|
-
return _regenerator["default"].wrap(function
|
|
1157
|
-
while (1) switch (
|
|
780
|
+
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
|
781
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
1158
782
|
case 0:
|
|
1159
|
-
|
|
783
|
+
_context7.next = 2;
|
|
1160
784
|
return this.displayList;
|
|
1161
785
|
case 2:
|
|
1162
|
-
displayList =
|
|
786
|
+
displayList = _context7.sent.find(function (item) {
|
|
1163
787
|
return item.id === id;
|
|
1164
788
|
});
|
|
1165
789
|
if (displayList) {
|
|
1166
|
-
|
|
790
|
+
_context7.next = 6;
|
|
1167
791
|
break;
|
|
1168
792
|
}
|
|
1169
793
|
this._showToast((0, _i18n.transI18n)('fmt_screenshare_tips_faild_screenselect'), 'error');
|
|
1170
|
-
return
|
|
794
|
+
return _context7.abrupt("return", false);
|
|
1171
795
|
case 6:
|
|
1172
|
-
return
|
|
796
|
+
return _context7.abrupt("return", true);
|
|
1173
797
|
case 7:
|
|
1174
798
|
case "end":
|
|
1175
|
-
return
|
|
799
|
+
return _context7.stop();
|
|
1176
800
|
}
|
|
1177
|
-
},
|
|
801
|
+
}, _callee7, this);
|
|
1178
802
|
}));
|
|
1179
|
-
function _validateDisplay(
|
|
803
|
+
function _validateDisplay(_x7) {
|
|
1180
804
|
return _validateDisplay2.apply(this, arguments);
|
|
1181
805
|
}
|
|
1182
806
|
return _validateDisplay;
|
|
@@ -1184,117 +808,66 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1184
808
|
}, {
|
|
1185
809
|
key: "_validateShareStart",
|
|
1186
810
|
value: function () {
|
|
1187
|
-
var _validateShareStart2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1188
|
-
return _regenerator["default"].wrap(function
|
|
1189
|
-
while (1) switch (
|
|
811
|
+
var _validateShareStart2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee8(id, type) {
|
|
812
|
+
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
|
813
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
1190
814
|
case 0:
|
|
1191
|
-
|
|
1192
|
-
if (!
|
|
1193
|
-
|
|
815
|
+
_context8.t0 = type === _type.AgoraRtcScreenCaptureType.WINDOW;
|
|
816
|
+
if (!_context8.t0) {
|
|
817
|
+
_context8.next = 5;
|
|
1194
818
|
break;
|
|
1195
819
|
}
|
|
1196
|
-
|
|
820
|
+
_context8.next = 4;
|
|
1197
821
|
return this._validateWindow(id);
|
|
1198
822
|
case 4:
|
|
1199
|
-
|
|
823
|
+
_context8.t0 = !_context8.sent;
|
|
1200
824
|
case 5:
|
|
1201
|
-
if (!
|
|
1202
|
-
|
|
825
|
+
if (!_context8.t0) {
|
|
826
|
+
_context8.next = 7;
|
|
1203
827
|
break;
|
|
1204
828
|
}
|
|
1205
|
-
return
|
|
829
|
+
return _context8.abrupt("return", false);
|
|
1206
830
|
case 7:
|
|
1207
|
-
|
|
1208
|
-
if (!
|
|
1209
|
-
|
|
831
|
+
_context8.t1 = type === _type.AgoraRtcScreenCaptureType.SCREEN;
|
|
832
|
+
if (!_context8.t1) {
|
|
833
|
+
_context8.next = 12;
|
|
1210
834
|
break;
|
|
1211
835
|
}
|
|
1212
|
-
|
|
836
|
+
_context8.next = 11;
|
|
1213
837
|
return this._validateDisplay(id);
|
|
1214
838
|
case 11:
|
|
1215
|
-
|
|
839
|
+
_context8.t1 = !_context8.sent;
|
|
1216
840
|
case 12:
|
|
1217
|
-
if (!
|
|
1218
|
-
|
|
841
|
+
if (!_context8.t1) {
|
|
842
|
+
_context8.next = 14;
|
|
1219
843
|
break;
|
|
1220
844
|
}
|
|
1221
|
-
return
|
|
845
|
+
return _context8.abrupt("return", false);
|
|
1222
846
|
case 14:
|
|
1223
|
-
return
|
|
847
|
+
return _context8.abrupt("return", true);
|
|
1224
848
|
case 15:
|
|
1225
849
|
case "end":
|
|
1226
|
-
return
|
|
850
|
+
return _context8.stop();
|
|
1227
851
|
}
|
|
1228
|
-
},
|
|
852
|
+
}, _callee8, this);
|
|
1229
853
|
}));
|
|
1230
|
-
function _validateShareStart(
|
|
854
|
+
function _validateShareStart(_x8, _x9) {
|
|
1231
855
|
return _validateShareStart2.apply(this, arguments);
|
|
1232
856
|
}
|
|
1233
857
|
return _validateShareStart;
|
|
1234
858
|
}()
|
|
1235
|
-
}, {
|
|
1236
|
-
key: "_hasScreenSharePermission",
|
|
1237
|
-
value: function _hasScreenSharePermission() {
|
|
1238
|
-
if (!this._securityStore.hasStartScreenSharePermission()) {
|
|
1239
|
-
this._showToast((0, _i18n.transI18n)('fmt_screenshare_cohost_can_not_share_remind'), 'error');
|
|
1240
|
-
return false;
|
|
1241
|
-
}
|
|
1242
|
-
return true;
|
|
1243
|
-
}
|
|
1244
|
-
}, {
|
|
1245
|
-
key: "_getExcludeWindows",
|
|
1246
|
-
value: function () {
|
|
1247
|
-
var _getExcludeWindows2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee15() {
|
|
1248
|
-
var excludeWindows;
|
|
1249
|
-
return _regenerator["default"].wrap(function _callee15$(_context15) {
|
|
1250
|
-
while (1) switch (_context15.prev = _context15.next) {
|
|
1251
|
-
case 0:
|
|
1252
|
-
excludeWindows = [];
|
|
1253
|
-
_context15.next = 3;
|
|
1254
|
-
return (0, _tools.waitUntil)(function () {
|
|
1255
|
-
var _getControlBarMediaSo, _getVideoWindowMediaS;
|
|
1256
|
-
var windowId = (_getControlBarMediaSo = (0, _rendererEvent.getControlBarMediaSourceId)()) !== null && _getControlBarMediaSo !== void 0 ? _getControlBarMediaSo : '';
|
|
1257
|
-
var _windowId$split = windowId.split(':'),
|
|
1258
|
-
_windowId$split2 = (0, _slicedToArray2["default"])(_windowId$split, 2),
|
|
1259
|
-
videoWindowId = _windowId$split2[1];
|
|
1260
|
-
if (videoWindowId && !excludeWindows.includes(videoWindowId)) {
|
|
1261
|
-
excludeWindows.push(videoWindowId);
|
|
1262
|
-
}
|
|
1263
|
-
windowId = (_getVideoWindowMediaS = (0, _rendererEvent.getVideoWindowMediaSourceId)()) !== null && _getVideoWindowMediaS !== void 0 ? _getVideoWindowMediaS : '';
|
|
1264
|
-
var _windowId$split3 = windowId.split(':'),
|
|
1265
|
-
_windowId$split4 = (0, _slicedToArray2["default"])(_windowId$split3, 2),
|
|
1266
|
-
controlBarWindowId = _windowId$split4[1];
|
|
1267
|
-
if (controlBarWindowId && !excludeWindows.includes(controlBarWindowId)) {
|
|
1268
|
-
excludeWindows.push(controlBarWindowId);
|
|
1269
|
-
}
|
|
1270
|
-
return !!videoWindowId && !!controlBarWindowId;
|
|
1271
|
-
}, 'control bar is open');
|
|
1272
|
-
case 3:
|
|
1273
|
-
this.logger.info('exclude win:', JSON.stringify(excludeWindows));
|
|
1274
|
-
return _context15.abrupt("return", excludeWindows);
|
|
1275
|
-
case 5:
|
|
1276
|
-
case "end":
|
|
1277
|
-
return _context15.stop();
|
|
1278
|
-
}
|
|
1279
|
-
}, _callee15, this);
|
|
1280
|
-
}));
|
|
1281
|
-
function _getExcludeWindows() {
|
|
1282
|
-
return _getExcludeWindows2.apply(this, arguments);
|
|
1283
|
-
}
|
|
1284
|
-
return _getExcludeWindows;
|
|
1285
|
-
}()
|
|
1286
859
|
}, {
|
|
1287
860
|
key: "_initControlbar",
|
|
1288
861
|
value: function () {
|
|
1289
|
-
var _initControlbar2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
862
|
+
var _initControlbar2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee9() {
|
|
1290
863
|
var params, mainWindow;
|
|
1291
|
-
return _regenerator["default"].wrap(function
|
|
1292
|
-
while (1) switch (
|
|
864
|
+
return _regenerator["default"].wrap(function _callee9$(_context9) {
|
|
865
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
1293
866
|
case 0:
|
|
1294
867
|
params = {
|
|
1295
868
|
currentShareAudioProcessingChannel: _shareAudio.AudioProcessingChannel.MONO,
|
|
1296
|
-
currentShareId: this.
|
|
1297
|
-
currentShareType: this.
|
|
869
|
+
currentShareId: this.currentShareId,
|
|
870
|
+
currentShareType: this.currentShareType,
|
|
1298
871
|
shareWithAudio: this.shareWithAudio,
|
|
1299
872
|
currentShareBounds: this.currentSelectionBounds
|
|
1300
873
|
};
|
|
@@ -1309,28 +882,25 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1309
882
|
}
|
|
1310
883
|
case 2:
|
|
1311
884
|
case "end":
|
|
1312
|
-
return
|
|
885
|
+
return _context9.stop();
|
|
1313
886
|
}
|
|
1314
|
-
},
|
|
887
|
+
}, _callee9, this);
|
|
1315
888
|
}));
|
|
1316
889
|
function _initControlbar() {
|
|
1317
890
|
return _initControlbar2.apply(this, arguments);
|
|
1318
891
|
}
|
|
1319
892
|
return _initControlbar;
|
|
1320
893
|
}()
|
|
894
|
+
}, {
|
|
895
|
+
key: "handleToggleScreenShareWithAudio",
|
|
896
|
+
value: function handleToggleScreenShareWithAudio(withAudio) {
|
|
897
|
+
this._screenShareProvider.toggleScreenshareWithAudio(withAudio);
|
|
898
|
+
}
|
|
1321
899
|
}]);
|
|
1322
900
|
}();
|
|
1323
901
|
_ShareScreenStore = ShareScreenStore;
|
|
1324
|
-
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_ShareScreenStore, [[_mobx.observable, 1, "
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
_init_currentSelection = _applyDecs$e[3];
|
|
1329
|
-
_init_currentSelectionType = _applyDecs$e[4];
|
|
1330
|
-
_init_shareWithAudio = _applyDecs$e[5];
|
|
1331
|
-
_init_boardOwnerUser = _applyDecs$e[6];
|
|
1332
|
-
_init_currentSelectionBounds = _applyDecs$e[7];
|
|
1333
|
-
_init_connectionState = _applyDecs$e[8];
|
|
1334
|
-
_init_handleChooseScreen = _applyDecs$e[9];
|
|
1335
|
-
_initProto = _applyDecs$e[10];
|
|
902
|
+
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_ShareScreenStore, [[_mobx.observable, 1, "boardOwnerUser"], [_setShareWithAudioStateDecs, 18, "setShareWithAudioState"], [_hasLoopbackDeviceDecs, 18, "hasLoopbackDevice"], [_setShareAudioProcessingChannelDecs, 18, "setShareAudioProcessingChannel"], [_decorator.bound, 2, "handlerBoardShareStop"], [_decorator.bound, 2, "release"], [_openRelaunchTipsDialogDecs, 18, "openRelaunchTipsDialog"], [_startRenderSharePreviewDecs, 18, "startRenderSharePreview"], [_stopRenderSharePreviewDecs, 18, "stopRenderSharePreview"], [_handleStopShareDecs, 18, "handleStopShare"], [_handleStartShareDecs, 18, "handleStartShare"], [_openShareScreenSelectionDecs, 18, "_openShareScreenSelection"], [_closeShareScreenSelectionDecs, 18, "_closeShareScreenSelection"], [_setControlBarWindowIdDecs, 18, "_setControlBarWindowId"], [_openVideoWindowDialogDecs, 18, "_openVideoWindowDialog"], [_closeControlBarDecs, 18, "_closeControlBar"], [_closeVideoWindowDialogDecs, 18, "_closeVideoWindowDialog"], [_handleReplaceScreenDecs, 18, "_handleReplaceScreen"], [_decorator.bound, 2, "_handleOnline"], [_decorator.bound, 2, "_handleOffline"], [_initControlbarDecs, 18, "_initControlbar"], [_decorator.bound, 2, "handleToggleScreenShareWithAudio"], [_handleChooseScreenDecs, 16, "handleChooseScreen"]], []).e, 3);
|
|
903
|
+
_init_boardOwnerUser = _applyDecs$e[0];
|
|
904
|
+
_init_handleChooseScreen = _applyDecs$e[1];
|
|
905
|
+
_initProto = _applyDecs$e[2];
|
|
1336
906
|
var StoreContext = exports.StoreContext = /*#__PURE__*/(0, _react.createContext)(null);
|