@webex/plugin-meetings 3.0.0-beta.14 → 3.0.0-beta.16
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/UPGRADING.md +9 -9
- package/browsers.js +19 -24
- package/dist/common/browser-detection.js +1 -20
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +5 -20
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js +0 -7
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +5 -26
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +5 -26
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +6 -27
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +5 -26
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/parameter.js +5 -33
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +5 -26
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +4 -25
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reconnection-in-progress.js +0 -17
- package/dist/common/errors/reconnection-in-progress.js.map +1 -1
- package/dist/common/errors/reconnection.js +5 -26
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +5 -26
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +6 -41
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +1 -24
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +0 -22
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +0 -23
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js +0 -12
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js +0 -15
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js +0 -4
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +1 -8
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.js +35 -61
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +4 -14
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +1 -5
- package/dist/config.js.map +1 -1
- package/dist/constants.js +45 -40
- package/dist/constants.js.map +1 -1
- package/dist/index.js +1 -17
- package/dist/index.js.map +1 -1
- package/dist/locus-info/controlsUtils.js +10 -28
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js +3 -26
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js +0 -15
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js +4 -12
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.js +101 -193
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +0 -38
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +12 -38
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +87 -123
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +16 -81
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +43 -97
- package/dist/media/index.js.map +1 -1
- package/dist/media/internal-media-core-wrapper.js +0 -4
- package/dist/media/internal-media-core-wrapper.js.map +1 -1
- package/dist/media/properties.js +64 -110
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js +2 -9
- package/dist/media/util.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +10 -12
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/effectsState.js +120 -192
- package/dist/meeting/effectsState.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +0 -13
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +819 -1591
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.js +31 -78
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +160 -230
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js +0 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/state.js +21 -31
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/util.js +19 -158
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/collection.js +3 -25
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +10 -33
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +179 -268
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +1 -16
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +98 -183
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +137 -228
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +3 -21
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +450 -582
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/request.js +7 -30
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +99 -155
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +49 -89
- package/dist/member/index.js.map +1 -1
- package/dist/member/util.js +17 -68
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +2 -12
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +72 -194
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +21 -56
- package/dist/members/request.js.map +1 -1
- package/dist/members/util.js +9 -38
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/config.js +0 -2
- package/dist/metrics/config.js.map +1 -1
- package/dist/metrics/constants.js +1 -2
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +48 -136
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +12 -28
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/multistreamMedia.js +11 -21
- package/dist/multistream/multistreamMedia.js.map +1 -1
- package/dist/multistream/receiveSlot.js +7 -47
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +38 -77
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +11 -56
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +6 -40
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +221 -380
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/networkQualityMonitor/index.js +28 -57
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/personal-meeting-room/index.js +10 -45
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +2 -33
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js +0 -13
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/index.js +100 -166
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +2 -18
- package/dist/reachability/request.js.map +1 -1
- package/dist/reactions/reactions.js +0 -2
- package/dist/reactions/reactions.js.map +1 -1
- package/dist/reactions/reactions.type.js +2 -6
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.js +294 -459
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/roap/index.js +18 -53
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +13 -55
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +10 -52
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/statsAnalyzer/global.js +0 -2
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +66 -174
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +54 -53
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +13 -45
- package/dist/transcription/index.js.map +1 -1
- package/internal-README.md +7 -6
- package/package.json +18 -18
- package/src/common/browser-detection.ts +9 -6
- package/src/common/collection.ts +3 -1
- package/src/common/errors/captcha-error.ts +6 -6
- package/src/common/errors/intent-to-join.ts +6 -6
- package/src/common/errors/join-meeting.ts +12 -8
- package/src/common/errors/media.ts +6 -6
- package/src/common/errors/parameter.ts +9 -6
- package/src/common/errors/password-error.ts +6 -6
- package/src/common/errors/permission.ts +5 -5
- package/src/common/errors/reconnection.ts +6 -6
- package/src/common/errors/stats.ts +6 -6
- package/src/common/errors/webex-errors.ts +7 -5
- package/src/common/errors/webex-meetings-error.ts +1 -1
- package/src/common/events/events-scope.ts +5 -1
- package/src/common/events/events.ts +5 -1
- package/src/common/events/trigger-proxy.ts +8 -3
- package/src/common/events/util.ts +1 -2
- package/src/common/logs/logger-proxy.ts +21 -10
- package/src/common/logs/request.ts +11 -8
- package/src/config.ts +11 -11
- package/src/constants.ts +1 -1
- package/src/index.js +1 -1
- package/src/locus-info/controlsUtils.ts +34 -24
- package/src/locus-info/fullState.ts +15 -11
- package/src/locus-info/hostUtils.ts +4 -3
- package/src/locus-info/index.ts +25 -34
- package/src/locus-info/infoUtils.ts +12 -4
- package/src/locus-info/mediaSharesUtils.ts +4 -4
- package/src/locus-info/parser.ts +45 -68
- package/src/locus-info/selfUtils.ts +106 -57
- package/src/media/index.ts +123 -135
- package/src/media/internal-media-core-wrapper.ts +2 -2
- package/src/media/properties.ts +30 -20
- package/src/media/util.ts +1 -1
- package/src/mediaQualityMetrics/config.ts +46 -46
- package/src/meeting/effectsState.ts +35 -35
- package/src/meeting/in-meeting-actions.ts +7 -3
- package/src/meeting/index.ts +1559 -1292
- package/src/meeting/muteState.ts +62 -31
- package/src/meeting/request.ts +155 -116
- package/src/meeting/request.type.ts +8 -8
- package/src/meeting/state.ts +45 -30
- package/src/meeting/util.ts +101 -70
- package/src/meeting-info/collection.ts +2 -1
- package/src/meeting-info/index.ts +32 -30
- package/src/meeting-info/meeting-info-v2.ts +106 -108
- package/src/meeting-info/request.ts +9 -3
- package/src/meeting-info/util.ts +54 -46
- package/src/meeting-info/utilv2.ts +59 -53
- package/src/meetings/collection.ts +1 -1
- package/src/meetings/index.ts +512 -440
- package/src/meetings/request.ts +26 -24
- package/src/meetings/util.ts +29 -29
- package/src/member/index.ts +55 -49
- package/src/member/util.ts +26 -13
- package/src/members/collection.ts +0 -1
- package/src/members/index.ts +182 -126
- package/src/members/request.ts +46 -14
- package/src/members/util.ts +44 -42
- package/src/metrics/config.ts +254 -81
- package/src/metrics/constants.ts +0 -2
- package/src/metrics/index.ts +84 -71
- package/src/multistream/multistreamMedia.ts +1 -0
- package/src/multistream/receiveSlot.ts +1 -0
- package/src/multistream/receiveSlotManager.ts +1 -0
- package/src/multistream/remoteMedia.ts +1 -1
- package/src/multistream/remoteMediaGroup.ts +2 -1
- package/src/multistream/remoteMediaManager.ts +3 -0
- package/src/networkQualityMonitor/index.ts +20 -23
- package/src/personal-meeting-room/index.ts +12 -16
- package/src/personal-meeting-room/request.ts +10 -3
- package/src/personal-meeting-room/util.ts +3 -3
- package/src/reachability/index.ts +61 -59
- package/src/reachability/request.ts +36 -32
- package/src/reactions/reactions.ts +4 -4
- package/src/reactions/reactions.type.ts +4 -3
- package/src/reconnection-manager/index.ts +139 -84
- package/src/roap/index.ts +46 -38
- package/src/roap/request.ts +44 -31
- package/src/roap/turnDiscovery.ts +59 -30
- package/src/statsAnalyzer/global.ts +30 -33
- package/src/statsAnalyzer/index.ts +432 -175
- package/src/statsAnalyzer/mqaUtil.ts +178 -72
- package/src/transcription/index.ts +34 -32
- package/test/integration/spec/journey.js +664 -463
- package/test/integration/spec/space-meeting.js +319 -204
- package/test/integration/spec/transcription.js +7 -8
- package/test/unit/spec/common/browser-detection.js +9 -28
- package/test/unit/spec/fixture/locus.js +92 -90
- package/test/unit/spec/locus-info/controlsUtils.js +5 -5
- package/test/unit/spec/locus-info/embeddedAppsUtils.js +8 -6
- package/test/unit/spec/locus-info/index.js +1 -2
- package/test/unit/spec/locus-info/infoUtils.js +26 -33
- package/test/unit/spec/locus-info/lib/BasicSeqCmp.json +88 -430
- package/test/unit/spec/locus-info/lib/SeqCmp.json +513 -685
- package/test/unit/spec/locus-info/parser.js +3 -9
- package/test/unit/spec/locus-info/selfConstant.js +72 -103
- package/test/unit/spec/locus-info/selfUtils.js +21 -12
- package/test/unit/spec/meeting/effectsState.js +36 -46
- package/test/unit/spec/meeting/in-meeting-actions.ts +2 -3
- package/test/unit/spec/meeting/index.js +1279 -685
- package/test/unit/spec/meeting/muteState.js +42 -33
- package/test/unit/spec/meeting/request.js +57 -46
- package/test/unit/spec/meeting/utils.js +78 -53
- package/test/unit/spec/meeting-info/meetinginfov2.js +100 -73
- package/test/unit/spec/meeting-info/request.js +7 -9
- package/test/unit/spec/meeting-info/util.js +11 -12
- package/test/unit/spec/meeting-info/utilv2.js +110 -74
- package/test/unit/spec/meetings/collection.js +1 -1
- package/test/unit/spec/meetings/index.js +438 -257
- package/test/unit/spec/meetings/utils.js +14 -12
- package/test/unit/spec/member/index.js +0 -1
- package/test/unit/spec/member/util.js +5 -6
- package/test/unit/spec/members/index.js +104 -54
- package/test/unit/spec/members/request.js +29 -20
- package/test/unit/spec/members/utils.js +8 -5
- package/test/unit/spec/metrics/index.js +16 -21
- package/test/unit/spec/networkQualityMonitor/index.js +21 -15
- package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +2 -7
- package/test/unit/spec/reachability/index.ts +9 -11
- package/test/unit/spec/reconnection-manager/index.js +16 -18
- package/test/unit/spec/roap/turnDiscovery.ts +22 -19
- package/test/unit/spec/stats-analyzer/index.js +25 -20
- package/test/utils/cmr.js +44 -42
- package/test/utils/testUtils.js +83 -74
- package/test/utils/webex-config.js +18 -18
- package/test/utils/webex-test-users.js +53 -50
package/dist/meeting/util.js
CHANGED
|
@@ -1,74 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$keys = require("@babel/runtime-corejs2/core-js/object/keys");
|
|
4
|
-
|
|
5
4
|
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs2/core-js/object/get-own-property-symbols");
|
|
6
|
-
|
|
7
5
|
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptor");
|
|
8
|
-
|
|
9
6
|
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptors");
|
|
10
|
-
|
|
11
7
|
var _Object$defineProperties = require("@babel/runtime-corejs2/core-js/object/define-properties");
|
|
12
|
-
|
|
13
8
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
14
|
-
|
|
15
9
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
16
|
-
|
|
17
10
|
_Object$defineProperty(exports, "__esModule", {
|
|
18
11
|
value: true
|
|
19
12
|
});
|
|
20
|
-
|
|
21
13
|
exports.default = void 0;
|
|
22
|
-
|
|
23
14
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
24
|
-
|
|
25
15
|
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
|
|
26
|
-
|
|
27
16
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/slicedToArray"));
|
|
28
|
-
|
|
29
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
30
|
-
|
|
31
18
|
var _isEmpty2 = _interopRequireDefault(require("lodash/isEmpty"));
|
|
32
|
-
|
|
33
19
|
var _webexErrors = require("../common/errors/webex-errors");
|
|
34
|
-
|
|
35
20
|
var _metrics = _interopRequireDefault(require("../metrics"));
|
|
36
|
-
|
|
37
21
|
var _config = require("../metrics/config");
|
|
38
|
-
|
|
39
22
|
var _media = _interopRequireDefault(require("../media"));
|
|
40
|
-
|
|
41
23
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
42
|
-
|
|
43
24
|
var _constants = require("../constants");
|
|
44
|
-
|
|
45
25
|
var _intentToJoin = _interopRequireDefault(require("../common/errors/intent-to-join"));
|
|
46
|
-
|
|
47
26
|
var _joinMeeting = _interopRequireDefault(require("../common/errors/join-meeting"));
|
|
48
|
-
|
|
49
27
|
var _parameter = _interopRequireDefault(require("../common/errors/parameter"));
|
|
50
|
-
|
|
51
28
|
var _permission = _interopRequireDefault(require("../common/errors/permission"));
|
|
52
|
-
|
|
53
29
|
var _passwordError = _interopRequireDefault(require("../common/errors/password-error"));
|
|
54
|
-
|
|
55
30
|
var _captchaError = _interopRequireDefault(require("../common/errors/captcha-error"));
|
|
56
|
-
|
|
57
31
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
58
|
-
|
|
59
32
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
60
|
-
|
|
61
33
|
var MeetingUtil = {};
|
|
62
|
-
|
|
63
34
|
MeetingUtil.parseLocusJoin = function (response) {
|
|
64
|
-
var parsed = {};
|
|
35
|
+
var parsed = {};
|
|
65
36
|
|
|
37
|
+
// First todo: add check for existance
|
|
66
38
|
parsed.locus = response.body.locus;
|
|
67
39
|
parsed.mediaConnections = response.body.mediaConnections;
|
|
68
40
|
parsed.locusUrl = parsed.locus.url;
|
|
69
41
|
parsed.locusId = parsed.locus.url.split('/').pop();
|
|
70
|
-
parsed.selfId = parsed.locus.self.id;
|
|
42
|
+
parsed.selfId = parsed.locus.self.id;
|
|
71
43
|
|
|
44
|
+
// we need mediaId before making roap calls
|
|
72
45
|
parsed.mediaConnections.forEach(function (mediaConnection) {
|
|
73
46
|
if (mediaConnection.mediaId) {
|
|
74
47
|
parsed.mediaId = mediaConnection.mediaId;
|
|
@@ -76,23 +49,18 @@ MeetingUtil.parseLocusJoin = function (response) {
|
|
|
76
49
|
});
|
|
77
50
|
return parsed;
|
|
78
51
|
};
|
|
79
|
-
|
|
80
52
|
MeetingUtil.remoteUpdateAudioVideo = function (audioMuted, videoMuted, meeting) {
|
|
81
53
|
if (!meeting) {
|
|
82
54
|
return _promise.default.reject(new _parameter.default('You need a meeting object.'));
|
|
83
55
|
}
|
|
84
|
-
|
|
85
56
|
var localMedias = _media.default.generateLocalMedias(meeting.mediaId, audioMuted, videoMuted);
|
|
86
|
-
|
|
87
57
|
if ((0, _isEmpty2.default)(localMedias)) {
|
|
88
58
|
return _promise.default.reject(new _parameter.default('You need a media id on the meeting to change remote audio.'));
|
|
89
59
|
}
|
|
90
|
-
|
|
91
60
|
_metrics.default.postEvent({
|
|
92
61
|
event: _config.eventType.MEDIA_REQUEST,
|
|
93
62
|
meeting: meeting
|
|
94
63
|
});
|
|
95
|
-
|
|
96
64
|
return meeting.meetingRequest.remoteAudioVideoToggle({
|
|
97
65
|
locusUrl: meeting.locusUrl,
|
|
98
66
|
selfId: meeting.selfId,
|
|
@@ -105,38 +73,31 @@ MeetingUtil.remoteUpdateAudioVideo = function (audioMuted, videoMuted, meeting)
|
|
|
105
73
|
event: _config.eventType.MEDIA_RESPONSE,
|
|
106
74
|
meeting: meeting
|
|
107
75
|
});
|
|
108
|
-
|
|
109
76
|
return response.body.locus;
|
|
110
77
|
});
|
|
111
78
|
};
|
|
112
|
-
|
|
113
79
|
MeetingUtil.hasOwner = function (info) {
|
|
114
80
|
return info && info.owner;
|
|
115
81
|
};
|
|
116
|
-
|
|
117
82
|
MeetingUtil.isOwnerSelf = function (owner, selfId) {
|
|
118
83
|
return owner === selfId;
|
|
119
84
|
};
|
|
120
|
-
|
|
121
85
|
MeetingUtil.isPinOrGuest = function (err) {
|
|
122
86
|
var _err$body;
|
|
123
|
-
|
|
124
87
|
return (err === null || err === void 0 ? void 0 : (_err$body = err.body) === null || _err$body === void 0 ? void 0 : _err$body.errorCode) && _constants.INTENT_TO_JOIN.includes(err.body.errorCode);
|
|
125
88
|
};
|
|
126
|
-
|
|
127
89
|
MeetingUtil.joinMeeting = function (meeting, options) {
|
|
128
90
|
if (!meeting) {
|
|
129
91
|
return _promise.default.reject(new _parameter.default('You need a meeting object.'));
|
|
130
92
|
}
|
|
131
|
-
|
|
132
93
|
_metrics.default.postEvent({
|
|
133
94
|
event: _config.eventType.LOCUS_JOIN_REQUEST,
|
|
134
95
|
meeting: meeting
|
|
135
|
-
});
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
// eslint-disable-next-line no-warning-comments
|
|
136
99
|
// TODO: check if the meeting is in JOINING state
|
|
137
100
|
// if Joining state termintate the request as user might click multiple times
|
|
138
|
-
|
|
139
|
-
|
|
140
101
|
return meeting.meetingRequest.joinMeeting({
|
|
141
102
|
inviteeAddress: meeting.meetingJoinUrl || meeting.sipUri,
|
|
142
103
|
meetingNumber: meeting.meetingNumber,
|
|
@@ -162,11 +123,9 @@ MeetingUtil.joinMeeting = function (meeting, options) {
|
|
|
162
123
|
trackingId: res.headers.trackingid
|
|
163
124
|
}
|
|
164
125
|
});
|
|
165
|
-
|
|
166
126
|
return MeetingUtil.parseLocusJoin(res);
|
|
167
127
|
});
|
|
168
128
|
};
|
|
169
|
-
|
|
170
129
|
MeetingUtil.cleanUp = function (meeting) {
|
|
171
130
|
// make sure we send last metrics before we close the peerconnection
|
|
172
131
|
var stopStatsAnalyzer = meeting.statsAnalyzer ? meeting.statsAnalyzer.stopAnalyzer() : _promise.default.resolve();
|
|
@@ -190,12 +149,10 @@ MeetingUtil.cleanUp = function (meeting) {
|
|
|
190
149
|
return meeting.updateLLMConnection();
|
|
191
150
|
});
|
|
192
151
|
};
|
|
193
|
-
|
|
194
152
|
MeetingUtil.disconnectPhoneAudio = function (meeting, phoneUrl) {
|
|
195
153
|
if (meeting.meetingState === _constants.FULL_STATE.INACTIVE) {
|
|
196
154
|
return _promise.default.reject(new _webexErrors.MeetingNotActiveError());
|
|
197
155
|
}
|
|
198
|
-
|
|
199
156
|
var options = {
|
|
200
157
|
locusUrl: meeting.locusUrl,
|
|
201
158
|
selfId: meeting.selfId,
|
|
@@ -204,33 +161,28 @@ MeetingUtil.disconnectPhoneAudio = function (meeting, phoneUrl) {
|
|
|
204
161
|
};
|
|
205
162
|
return meeting.meetingRequest.disconnectPhoneAudio(options).then(function (response) {
|
|
206
163
|
var _response$body;
|
|
207
|
-
|
|
208
164
|
if (response !== null && response !== void 0 && (_response$body = response.body) !== null && _response$body !== void 0 && _response$body.locus) {
|
|
209
165
|
meeting.locusInfo.onFullLocus(response.body.locus);
|
|
210
166
|
}
|
|
211
167
|
}).catch(function (err) {
|
|
212
168
|
_loggerProxy.default.logger.error("Meeting:util#disconnectPhoneAudio --> An error occured while disconnecting phone audio in meeting ".concat(meeting.id, ", error: ").concat(err));
|
|
213
|
-
|
|
214
169
|
return _promise.default.reject(err);
|
|
215
170
|
});
|
|
216
|
-
};
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
// by default will leave on meeting's resourceId
|
|
217
174
|
// if you explicity want it not to leave on resource id, pass
|
|
218
175
|
// {resourceId: null}
|
|
219
176
|
// TODO: chris, you can modify this however you want
|
|
220
|
-
|
|
221
|
-
|
|
222
177
|
MeetingUtil.leaveMeeting = function (meeting) {
|
|
223
178
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
224
|
-
|
|
225
179
|
if (meeting.meetingState === _constants.FULL_STATE.INACTIVE) {
|
|
226
180
|
// TODO: clean up if the meeting is already inactive
|
|
227
181
|
return _promise.default.reject(new _webexErrors.MeetingNotActiveError());
|
|
228
182
|
}
|
|
229
|
-
|
|
230
183
|
if (MeetingUtil.isUserInLeftState(meeting.locusInfo)) {
|
|
231
184
|
return _promise.default.reject(new _webexErrors.UserNotJoinedError());
|
|
232
185
|
}
|
|
233
|
-
|
|
234
186
|
var defaultOptions = {
|
|
235
187
|
locusUrl: meeting.locusUrl,
|
|
236
188
|
selfId: meeting.selfId,
|
|
@@ -238,32 +190,26 @@ MeetingUtil.leaveMeeting = function (meeting) {
|
|
|
238
190
|
resourceId: meeting.resourceId,
|
|
239
191
|
deviceUrl: meeting.deviceUrl
|
|
240
192
|
};
|
|
241
|
-
|
|
242
193
|
var leaveOptions = _objectSpread(_objectSpread({}, defaultOptions), options);
|
|
243
|
-
|
|
244
194
|
return meeting.meetingRequest.leaveMeeting(leaveOptions).then(function (response) {
|
|
245
195
|
if (response && response.body && response.body.locus) {
|
|
246
196
|
// && !options.moveMeeting) {
|
|
247
197
|
meeting.locusInfo.onFullLocus(response.body.locus);
|
|
248
198
|
}
|
|
249
|
-
|
|
250
199
|
return _promise.default.resolve();
|
|
251
200
|
}).then(function () {
|
|
252
201
|
if (options.moveMeeting) {
|
|
253
202
|
return _promise.default.resolve();
|
|
254
203
|
}
|
|
255
|
-
|
|
256
204
|
return MeetingUtil.cleanUp(meeting);
|
|
257
205
|
}).catch(function (err) {
|
|
258
206
|
// TODO: If the meeting state comes as LEFT or INACTIVE as response then
|
|
259
207
|
// 1) on leave clean up the meeting or simply do a sync on the meeting
|
|
260
208
|
// 2) If the error says meeting is inactive then destroy the meeting object
|
|
261
209
|
_loggerProxy.default.logger.error("Meeting:util#leaveMeeting --> An error occured while trying to leave meeting with an id of ".concat(meeting.id, ", error: ").concat(err));
|
|
262
|
-
|
|
263
210
|
return _promise.default.reject(err);
|
|
264
211
|
});
|
|
265
212
|
};
|
|
266
|
-
|
|
267
213
|
MeetingUtil.declineMeeting = function (meeting, reason) {
|
|
268
214
|
return meeting.meetingRequest.declineMeeting({
|
|
269
215
|
locusUrl: meeting.locusUrl,
|
|
@@ -271,49 +217,38 @@ MeetingUtil.declineMeeting = function (meeting, reason) {
|
|
|
271
217
|
reason: reason
|
|
272
218
|
});
|
|
273
219
|
};
|
|
274
|
-
|
|
275
220
|
MeetingUtil.isUserInLeftState = function (locusInfo) {
|
|
276
221
|
var _locusInfo$parsedLocu, _locusInfo$parsedLocu2;
|
|
277
|
-
|
|
278
222
|
return ((_locusInfo$parsedLocu = locusInfo.parsedLocus) === null || _locusInfo$parsedLocu === void 0 ? void 0 : (_locusInfo$parsedLocu2 = _locusInfo$parsedLocu.self) === null || _locusInfo$parsedLocu2 === void 0 ? void 0 : _locusInfo$parsedLocu2.state) === _constants._LEFT_;
|
|
279
223
|
};
|
|
280
|
-
|
|
281
224
|
MeetingUtil.isUserInIdleState = function (locusInfo) {
|
|
282
225
|
var _locusInfo$parsedLocu3, _locusInfo$parsedLocu4;
|
|
283
|
-
|
|
284
226
|
return ((_locusInfo$parsedLocu3 = locusInfo.parsedLocus) === null || _locusInfo$parsedLocu3 === void 0 ? void 0 : (_locusInfo$parsedLocu4 = _locusInfo$parsedLocu3.self) === null || _locusInfo$parsedLocu4 === void 0 ? void 0 : _locusInfo$parsedLocu4.state) === _constants._IDLE_;
|
|
285
227
|
};
|
|
286
|
-
|
|
287
228
|
MeetingUtil.isUserInJoinedState = function (locusInfo) {
|
|
288
229
|
var _locusInfo$parsedLocu5, _locusInfo$parsedLocu6;
|
|
289
|
-
|
|
290
230
|
return ((_locusInfo$parsedLocu5 = locusInfo.parsedLocus) === null || _locusInfo$parsedLocu5 === void 0 ? void 0 : (_locusInfo$parsedLocu6 = _locusInfo$parsedLocu5.self) === null || _locusInfo$parsedLocu6 === void 0 ? void 0 : _locusInfo$parsedLocu6.state) === _constants._JOINED_;
|
|
291
231
|
};
|
|
292
|
-
|
|
293
232
|
MeetingUtil.isMediaEstablished = function (currentMediaStatus) {
|
|
294
233
|
return currentMediaStatus && (currentMediaStatus.audio || currentMediaStatus.video || currentMediaStatus.share);
|
|
295
234
|
};
|
|
296
|
-
|
|
297
235
|
MeetingUtil.joinMeetingOptions = function (meeting) {
|
|
298
236
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
299
237
|
meeting.resourceId = meeting.resourceId || options.resourceId;
|
|
300
|
-
|
|
301
238
|
if (meeting.requiredCaptcha) {
|
|
302
239
|
return _promise.default.reject(new _captchaError.default());
|
|
303
240
|
}
|
|
304
|
-
|
|
305
241
|
if (meeting.passwordStatus === _constants.PASSWORD_STATUS.REQUIRED) {
|
|
306
242
|
return _promise.default.reject(new _passwordError.default());
|
|
307
243
|
}
|
|
308
|
-
|
|
309
244
|
if (options.pin) {
|
|
310
245
|
_metrics.default.postEvent({
|
|
311
246
|
event: _config.eventType.PIN_COLLECTED,
|
|
312
247
|
meeting: meeting
|
|
313
248
|
});
|
|
314
|
-
}
|
|
315
|
-
|
|
249
|
+
}
|
|
316
250
|
|
|
251
|
+
// normal join meeting, scenario A, D
|
|
317
252
|
return MeetingUtil.joinMeeting(meeting, options).then(function (response) {
|
|
318
253
|
meeting.setLocus(response);
|
|
319
254
|
return _promise.default.resolve(response);
|
|
@@ -323,133 +258,101 @@ MeetingUtil.joinMeetingOptions = function (meeting) {
|
|
|
323
258
|
_metrics.default.postEvent({
|
|
324
259
|
event: _config.eventType.PIN_PROMPT,
|
|
325
260
|
meeting: meeting
|
|
326
|
-
});
|
|
327
|
-
// see https://sqbu-github.cisco.com/WebExSquared/locus/wiki/Locus-Lobby-and--IVR-Feature
|
|
328
|
-
|
|
261
|
+
});
|
|
329
262
|
|
|
263
|
+
// request host pin or non host for unclaimed PMR, start of Scenario C
|
|
264
|
+
// see https://sqbu-github.cisco.com/WebExSquared/locus/wiki/Locus-Lobby-and--IVR-Feature
|
|
330
265
|
return _promise.default.reject(new _intentToJoin.default('Error Joining Meeting', err));
|
|
331
266
|
}
|
|
332
|
-
|
|
333
267
|
_loggerProxy.default.logger.error('Meeting:util#joinMeetingOptions --> Error joining the call, ', err);
|
|
334
|
-
|
|
335
268
|
return _promise.default.reject(new _joinMeeting.default(options, 'Error Joining Meeting', err));
|
|
336
269
|
});
|
|
337
270
|
};
|
|
338
|
-
|
|
339
271
|
MeetingUtil.validateOptions = function (options) {
|
|
340
272
|
var sendVideo = options.sendVideo,
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
273
|
+
sendAudio = options.sendAudio,
|
|
274
|
+
sendShare = options.sendShare,
|
|
275
|
+
localStream = options.localStream,
|
|
276
|
+
localShare = options.localShare;
|
|
346
277
|
if (sendVideo && !MeetingUtil.getTrack(localStream).videoTrack) {
|
|
347
278
|
return _promise.default.reject(new _parameter.default('please pass valid video streams'));
|
|
348
279
|
}
|
|
349
|
-
|
|
350
280
|
if (sendAudio && !MeetingUtil.getTrack(localStream).audioTrack) {
|
|
351
281
|
return _promise.default.reject(new _parameter.default('please pass valid audio streams'));
|
|
352
282
|
}
|
|
353
|
-
|
|
354
283
|
if (sendShare && !MeetingUtil.getTrack(localShare).videoTrack) {
|
|
355
284
|
return _promise.default.reject(new _parameter.default('please pass valid share streams'));
|
|
356
285
|
}
|
|
357
|
-
|
|
358
286
|
return _promise.default.resolve();
|
|
359
287
|
};
|
|
360
|
-
|
|
361
288
|
MeetingUtil.getTrack = function (stream) {
|
|
362
289
|
var audioTrack = null;
|
|
363
290
|
var videoTrack = null;
|
|
364
291
|
var audioTracks = null;
|
|
365
292
|
var videoTracks = null;
|
|
366
|
-
|
|
367
293
|
if (!stream) {
|
|
368
294
|
return {
|
|
369
295
|
audioTrack: null,
|
|
370
296
|
videoTrack: null
|
|
371
297
|
};
|
|
372
298
|
}
|
|
373
|
-
|
|
374
299
|
if (stream.getAudioTracks) {
|
|
375
300
|
audioTracks = stream.getAudioTracks();
|
|
376
301
|
}
|
|
377
|
-
|
|
378
302
|
if (stream.getVideoTracks) {
|
|
379
303
|
videoTracks = stream.getVideoTracks();
|
|
380
304
|
}
|
|
381
|
-
|
|
382
305
|
if (audioTracks && audioTracks.length > 0) {
|
|
383
306
|
var _audioTracks = audioTracks;
|
|
384
|
-
|
|
385
307
|
var _audioTracks2 = (0, _slicedToArray2.default)(_audioTracks, 1);
|
|
386
|
-
|
|
387
308
|
audioTrack = _audioTracks2[0];
|
|
388
309
|
}
|
|
389
|
-
|
|
390
310
|
if (videoTracks && videoTracks.length > 0) {
|
|
391
311
|
var _videoTracks = videoTracks;
|
|
392
|
-
|
|
393
312
|
var _videoTracks2 = (0, _slicedToArray2.default)(_videoTracks, 1);
|
|
394
|
-
|
|
395
313
|
videoTrack = _videoTracks2[0];
|
|
396
314
|
}
|
|
397
|
-
|
|
398
315
|
return {
|
|
399
316
|
audioTrack: audioTrack,
|
|
400
317
|
videoTrack: videoTrack
|
|
401
318
|
};
|
|
402
319
|
};
|
|
403
|
-
|
|
404
320
|
MeetingUtil.getModeratorFromLocusInfo = function (locusInfo) {
|
|
405
321
|
return locusInfo && locusInfo.parsedLocus && locusInfo.parsedLocus.info && locusInfo.parsedLocus.info && locusInfo.parsedLocus.info.moderator;
|
|
406
322
|
};
|
|
407
|
-
|
|
408
323
|
MeetingUtil.getPolicyFromLocusInfo = function (locusInfo) {
|
|
409
324
|
return locusInfo && locusInfo.parsedLocus && locusInfo.parsedLocus.info && locusInfo.parsedLocus.info && locusInfo.parsedLocus.info.policy;
|
|
410
325
|
};
|
|
411
|
-
|
|
412
326
|
MeetingUtil.getUserDisplayHintsFromLocusInfo = function (locusInfo) {
|
|
413
327
|
var _locusInfo$parsedLocu7, _locusInfo$parsedLocu8;
|
|
414
|
-
|
|
415
328
|
return (locusInfo === null || locusInfo === void 0 ? void 0 : (_locusInfo$parsedLocu7 = locusInfo.parsedLocus) === null || _locusInfo$parsedLocu7 === void 0 ? void 0 : (_locusInfo$parsedLocu8 = _locusInfo$parsedLocu7.info) === null || _locusInfo$parsedLocu8 === void 0 ? void 0 : _locusInfo$parsedLocu8.userDisplayHints) || [];
|
|
416
329
|
};
|
|
417
|
-
|
|
418
330
|
MeetingUtil.canInviteNewParticipants = function (displayHints) {
|
|
419
331
|
return displayHints.includes(_constants.DISPLAY_HINTS.ADD_GUEST);
|
|
420
332
|
};
|
|
421
|
-
|
|
422
333
|
MeetingUtil.canAdmitParticipant = function (displayHints) {
|
|
423
334
|
return displayHints.includes(_constants.DISPLAY_HINTS.ROSTER_WAITING_TO_JOIN);
|
|
424
335
|
};
|
|
425
|
-
|
|
426
336
|
MeetingUtil.canUserLock = function (displayHints) {
|
|
427
337
|
return displayHints.includes(_constants.DISPLAY_HINTS.LOCK_CONTROL_LOCK) && displayHints.includes(_constants.DISPLAY_HINTS.LOCK_STATUS_UNLOCKED);
|
|
428
338
|
};
|
|
429
|
-
|
|
430
339
|
MeetingUtil.canUserUnlock = function (displayHints) {
|
|
431
340
|
return displayHints.includes(_constants.DISPLAY_HINTS.LOCK_CONTROL_UNLOCK) && displayHints.includes(_constants.DISPLAY_HINTS.LOCK_STATUS_LOCKED);
|
|
432
341
|
};
|
|
433
|
-
|
|
434
342
|
MeetingUtil.canUserRecord = function (displayHints) {
|
|
435
343
|
return displayHints.includes(_constants.DISPLAY_HINTS.RECORDING_CONTROL_START);
|
|
436
344
|
};
|
|
437
|
-
|
|
438
345
|
MeetingUtil.canUserPause = function (displayHints) {
|
|
439
346
|
return displayHints.includes(_constants.DISPLAY_HINTS.RECORDING_CONTROL_PAUSE);
|
|
440
347
|
};
|
|
441
|
-
|
|
442
348
|
MeetingUtil.canUserResume = function (displayHints) {
|
|
443
349
|
return displayHints.includes(_constants.DISPLAY_HINTS.RECORDING_CONTROL_RESUME);
|
|
444
350
|
};
|
|
445
|
-
|
|
446
351
|
MeetingUtil.canUserStop = function (displayHints) {
|
|
447
352
|
return displayHints.includes(_constants.DISPLAY_HINTS.RECORDING_CONTROL_STOP);
|
|
448
353
|
};
|
|
449
|
-
|
|
450
354
|
MeetingUtil.startRecording = function (request, locusUrl, locusInfo) {
|
|
451
355
|
var displayHints = MeetingUtil.getUserDisplayHintsFromLocusInfo(locusInfo);
|
|
452
|
-
|
|
453
356
|
if (MeetingUtil.canUserRecord(displayHints)) {
|
|
454
357
|
return request.recordMeeting({
|
|
455
358
|
locusUrl: locusUrl,
|
|
@@ -457,13 +360,10 @@ MeetingUtil.startRecording = function (request, locusUrl, locusInfo) {
|
|
|
457
360
|
paused: false
|
|
458
361
|
});
|
|
459
362
|
}
|
|
460
|
-
|
|
461
363
|
return _promise.default.reject(new _permission.default('Start recording not allowed, due to moderator property.'));
|
|
462
364
|
};
|
|
463
|
-
|
|
464
365
|
MeetingUtil.pauseRecording = function (request, locusUrl, locusInfo) {
|
|
465
366
|
var displayHints = MeetingUtil.getUserDisplayHintsFromLocusInfo(locusInfo);
|
|
466
|
-
|
|
467
367
|
if (MeetingUtil.canUserPause(displayHints)) {
|
|
468
368
|
return request.recordMeeting({
|
|
469
369
|
locusUrl: locusUrl,
|
|
@@ -471,13 +371,10 @@ MeetingUtil.pauseRecording = function (request, locusUrl, locusInfo) {
|
|
|
471
371
|
paused: true
|
|
472
372
|
});
|
|
473
373
|
}
|
|
474
|
-
|
|
475
374
|
return _promise.default.reject(new _permission.default('Pause recording not allowed, due to moderator property.'));
|
|
476
375
|
};
|
|
477
|
-
|
|
478
376
|
MeetingUtil.resumeRecording = function (request, locusUrl, locusInfo) {
|
|
479
377
|
var displayHints = MeetingUtil.getUserDisplayHintsFromLocusInfo(locusInfo);
|
|
480
|
-
|
|
481
378
|
if (MeetingUtil.canUserResume(displayHints)) {
|
|
482
379
|
return request.recordMeeting({
|
|
483
380
|
locusUrl: locusUrl,
|
|
@@ -485,13 +382,10 @@ MeetingUtil.resumeRecording = function (request, locusUrl, locusInfo) {
|
|
|
485
382
|
paused: false
|
|
486
383
|
});
|
|
487
384
|
}
|
|
488
|
-
|
|
489
385
|
return _promise.default.reject(new _permission.default('Resume recording not allowed, due to moderator property.'));
|
|
490
386
|
};
|
|
491
|
-
|
|
492
387
|
MeetingUtil.stopRecording = function (request, locusUrl, locusInfo) {
|
|
493
388
|
var displayHints = MeetingUtil.getUserDisplayHintsFromLocusInfo(locusInfo);
|
|
494
|
-
|
|
495
389
|
if (MeetingUtil.canUserStop(displayHints)) {
|
|
496
390
|
return request.recordMeeting({
|
|
497
391
|
locusUrl: locusUrl,
|
|
@@ -499,26 +393,20 @@ MeetingUtil.stopRecording = function (request, locusUrl, locusInfo) {
|
|
|
499
393
|
paused: false
|
|
500
394
|
});
|
|
501
395
|
}
|
|
502
|
-
|
|
503
396
|
return _promise.default.reject(new _permission.default('Stop recording not allowed, due to moderator property.'));
|
|
504
397
|
};
|
|
505
|
-
|
|
506
398
|
MeetingUtil.canUserRaiseHand = function (displayHints) {
|
|
507
399
|
return displayHints.includes(_constants.DISPLAY_HINTS.RAISE_HAND);
|
|
508
400
|
};
|
|
509
|
-
|
|
510
401
|
MeetingUtil.canUserLowerAllHands = function (displayHints) {
|
|
511
402
|
return displayHints.includes(_constants.DISPLAY_HINTS.LOWER_ALL_HANDS);
|
|
512
403
|
};
|
|
513
|
-
|
|
514
404
|
MeetingUtil.canUserLowerSomeoneElsesHand = function (displayHints) {
|
|
515
405
|
return displayHints.includes(_constants.DISPLAY_HINTS.LOWER_SOMEONE_ELSES_HAND);
|
|
516
406
|
};
|
|
517
|
-
|
|
518
407
|
MeetingUtil.bothLeaveAndEndMeetingAvailable = function (displayHints) {
|
|
519
408
|
return displayHints.includes(_constants.DISPLAY_HINTS.LEAVE_TRANSFER_HOST_END_MEETING) || displayHints.includes(_constants.DISPLAY_HINTS.LEAVE_END_MEETING);
|
|
520
409
|
};
|
|
521
|
-
|
|
522
410
|
MeetingUtil.lockMeeting = function (actions, request, locusUrl) {
|
|
523
411
|
if (actions && actions.canLock) {
|
|
524
412
|
return request.lockMeeting({
|
|
@@ -526,10 +414,8 @@ MeetingUtil.lockMeeting = function (actions, request, locusUrl) {
|
|
|
526
414
|
lock: true
|
|
527
415
|
});
|
|
528
416
|
}
|
|
529
|
-
|
|
530
417
|
return _promise.default.reject(new _permission.default('Lock not allowed, due to joined property.'));
|
|
531
418
|
};
|
|
532
|
-
|
|
533
419
|
MeetingUtil.unlockMeeting = function (actions, request, locusUrl) {
|
|
534
420
|
if (actions && actions.canUnlock) {
|
|
535
421
|
return request.lockMeeting({
|
|
@@ -537,51 +423,38 @@ MeetingUtil.unlockMeeting = function (actions, request, locusUrl) {
|
|
|
537
423
|
lock: false
|
|
538
424
|
});
|
|
539
425
|
}
|
|
540
|
-
|
|
541
426
|
return _promise.default.reject(new _permission.default('Unlock not allowed, due to joined property.'));
|
|
542
427
|
};
|
|
543
|
-
|
|
544
428
|
MeetingUtil.handleAudioLogging = function (audioTrack) {
|
|
545
429
|
var LOG_HEADER = 'MeetingUtil#handleAudioLogging -->';
|
|
546
|
-
|
|
547
430
|
if (audioTrack) {
|
|
548
431
|
var settings = audioTrack.getSettings();
|
|
549
432
|
var deviceId = settings.deviceId;
|
|
550
|
-
|
|
551
433
|
_loggerProxy.default.logger.log(LOG_HEADER, "deviceId = ".concat(deviceId));
|
|
552
|
-
|
|
553
434
|
_loggerProxy.default.logger.log(LOG_HEADER, 'settings =', (0, _stringify.default)(settings));
|
|
554
435
|
}
|
|
555
436
|
};
|
|
556
|
-
|
|
557
437
|
MeetingUtil.handleVideoLogging = function (videoTrack) {
|
|
558
438
|
var LOG_HEADER = 'MeetingUtil#handleVideoLogging -->';
|
|
559
|
-
|
|
560
439
|
if (videoTrack) {
|
|
561
440
|
var settings = videoTrack.getSettings();
|
|
562
441
|
var deviceId = settings.deviceId;
|
|
563
|
-
|
|
564
442
|
_loggerProxy.default.logger.log(LOG_HEADER, "deviceId = ".concat(deviceId));
|
|
565
|
-
|
|
566
443
|
_loggerProxy.default.logger.log(LOG_HEADER, 'settings =', (0, _stringify.default)(settings));
|
|
567
444
|
}
|
|
568
445
|
};
|
|
569
|
-
|
|
570
446
|
MeetingUtil.handleDeviceLogging = function () {
|
|
571
447
|
var devices = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
572
448
|
var LOG_HEADER = 'MeetingUtil#handleDeviceLogging -->';
|
|
573
449
|
devices.forEach(function (device) {
|
|
574
450
|
_loggerProxy.default.logger.log(LOG_HEADER, "deviceId = ".concat(device.deviceId));
|
|
575
|
-
|
|
576
451
|
_loggerProxy.default.logger.log(LOG_HEADER, 'settings', (0, _stringify.default)(device));
|
|
577
452
|
});
|
|
578
453
|
};
|
|
579
|
-
|
|
580
454
|
MeetingUtil.endMeetingForAll = function (meeting) {
|
|
581
455
|
if (meeting.meetingState === _constants.FULL_STATE.INACTIVE) {
|
|
582
456
|
return _promise.default.reject(new _webexErrors.MeetingNotActiveError());
|
|
583
457
|
}
|
|
584
|
-
|
|
585
458
|
var endOptions = {
|
|
586
459
|
locusUrl: meeting.locusUrl
|
|
587
460
|
};
|
|
@@ -589,53 +462,41 @@ MeetingUtil.endMeetingForAll = function (meeting) {
|
|
|
589
462
|
if (response && response.body && response.body.locus) {
|
|
590
463
|
meeting.locusInfo.onFullLocus(response.body.locus);
|
|
591
464
|
}
|
|
592
|
-
|
|
593
465
|
return _promise.default.resolve();
|
|
594
466
|
}).then(function () {
|
|
595
467
|
return MeetingUtil.cleanUp(meeting);
|
|
596
468
|
}).catch(function (err) {
|
|
597
469
|
_loggerProxy.default.logger.error("Meeting:util#endMeetingForAll An error occured while trying to end meeting for all with an id of ".concat(meeting.id, ", error: ").concat(err));
|
|
598
|
-
|
|
599
470
|
return _promise.default.reject(err);
|
|
600
471
|
});
|
|
601
472
|
};
|
|
602
|
-
|
|
603
473
|
MeetingUtil.canEnableClosedCaption = function (displayHints) {
|
|
604
474
|
return displayHints.includes(_constants.DISPLAY_HINTS.CAPTION_START);
|
|
605
475
|
};
|
|
606
|
-
|
|
607
476
|
MeetingUtil.canStartTranscribing = function (displayHints) {
|
|
608
477
|
return displayHints.includes(_constants.DISPLAY_HINTS.TRANSCRIPTION_CONTROL_START);
|
|
609
478
|
};
|
|
610
|
-
|
|
611
479
|
MeetingUtil.canStopTranscribing = function (displayHints) {
|
|
612
480
|
return displayHints.includes(_constants.DISPLAY_HINTS.TRANSCRIPTION_CONTROL_STOP);
|
|
613
481
|
};
|
|
614
|
-
|
|
615
482
|
MeetingUtil.isClosedCaptionActive = function (displayHints) {
|
|
616
483
|
return displayHints.includes(_constants.DISPLAY_HINTS.CAPTION_STATUS_ACTIVE);
|
|
617
484
|
};
|
|
618
|
-
|
|
619
485
|
MeetingUtil.isWebexAssistantActive = function (displayHints) {
|
|
620
486
|
return displayHints.includes(_constants.DISPLAY_HINTS.WEBEX_ASSISTANT_STATUS_ACTIVE);
|
|
621
487
|
};
|
|
622
|
-
|
|
623
488
|
MeetingUtil.canViewCaptionPanel = function (displayHints) {
|
|
624
489
|
return displayHints.includes(_constants.DISPLAY_HINTS.ENABLE_CAPTION_PANEL);
|
|
625
490
|
};
|
|
626
|
-
|
|
627
491
|
MeetingUtil.isRealTimeTranslationEnabled = function (displayHints) {
|
|
628
492
|
return displayHints.includes(_constants.DISPLAY_HINTS.DISPLAY_REAL_TIME_TRANSLATION);
|
|
629
493
|
};
|
|
630
|
-
|
|
631
494
|
MeetingUtil.canSelectSpokenLanguages = function (displayHints) {
|
|
632
495
|
return displayHints.includes(_constants.DISPLAY_HINTS.DISPLAY_NON_ENGLISH_ASR);
|
|
633
496
|
};
|
|
634
|
-
|
|
635
497
|
MeetingUtil.waitingForOthersToJoin = function (displayHints) {
|
|
636
498
|
return displayHints.includes(_constants.DISPLAY_HINTS.WAITING_FOR_OTHERS);
|
|
637
499
|
};
|
|
638
|
-
|
|
639
500
|
var _default = MeetingUtil;
|
|
640
501
|
exports.default = _default;
|
|
641
502
|
//# sourceMappingURL=util.js.map
|