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