@webex/plugin-meetings 2.37.0 → 2.37.1
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/meetings/util.js
CHANGED
|
@@ -1,149 +1,118 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
-
|
|
5
4
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
5
|
_Object$defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
|
-
|
|
11
8
|
exports.default = void 0;
|
|
12
|
-
|
|
13
9
|
var _now = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/date/now"));
|
|
14
|
-
|
|
15
10
|
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
16
|
-
|
|
17
11
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
18
|
-
|
|
19
12
|
var _constants = require("../constants");
|
|
20
|
-
|
|
21
13
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
22
|
-
|
|
23
14
|
var _triggerProxy = _interopRequireDefault(require("../common/events/trigger-proxy"));
|
|
24
|
-
|
|
25
15
|
/* globals window */
|
|
26
16
|
|
|
27
17
|
/**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
18
|
+
* Meetings Media Codec Missing Event
|
|
19
|
+
* Emitted when H.264 codec is not
|
|
20
|
+
* found in the browser.
|
|
21
|
+
* @event media:codec:missing
|
|
22
|
+
* @instance
|
|
23
|
+
* @memberof MeetingsUtil
|
|
24
|
+
*/
|
|
35
25
|
|
|
36
26
|
/**
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
var MeetingsUtil = {};
|
|
27
|
+
* Meetings Media Codec Loaded Event
|
|
28
|
+
* Emitted when H.264 codec has been
|
|
29
|
+
* loaded in the browser.
|
|
30
|
+
* @event media:codec:loaded
|
|
31
|
+
* @instance
|
|
32
|
+
* @memberof MeetingsUtil
|
|
33
|
+
*/
|
|
45
34
|
|
|
35
|
+
var MeetingsUtil = {};
|
|
46
36
|
MeetingsUtil.getMeetingAddedType = function (type) {
|
|
47
37
|
return type === _constants._LOCUS_ID_ ? _constants._INCOMING_ : _constants._CREATED_;
|
|
48
38
|
};
|
|
49
|
-
|
|
50
39
|
MeetingsUtil.handleRoapMercury = function (envelope, meetingCollection) {
|
|
51
40
|
var data = envelope.data;
|
|
52
41
|
var eventType = data.eventType;
|
|
53
|
-
|
|
54
42
|
if (eventType === _constants.LOCUSEVENT.MESSAGE_ROAP) {
|
|
55
43
|
var meeting = meetingCollection.getByKey(_constants.CORRELATION_ID, data.correlationId);
|
|
56
|
-
|
|
57
44
|
if (meeting) {
|
|
58
45
|
meeting.roap.roapEvent(data);
|
|
59
46
|
}
|
|
60
47
|
}
|
|
61
48
|
};
|
|
62
|
-
|
|
63
49
|
MeetingsUtil.checkForCorrelationId = function (deviceUrl, locus) {
|
|
64
50
|
var devices = [];
|
|
65
|
-
|
|
66
51
|
if (locus) {
|
|
67
52
|
if (locus && locus.self && locus.self.devices) {
|
|
68
53
|
devices = locus.self.devices;
|
|
69
54
|
}
|
|
70
|
-
|
|
71
55
|
var foundDevice = devices.find(function (device) {
|
|
72
56
|
return device.url === deviceUrl;
|
|
73
57
|
});
|
|
74
|
-
|
|
75
58
|
if (foundDevice && foundDevice.correlationId) {
|
|
76
59
|
return foundDevice.correlationId;
|
|
77
60
|
}
|
|
78
61
|
}
|
|
79
|
-
|
|
80
62
|
return false;
|
|
81
63
|
};
|
|
82
|
-
|
|
83
64
|
MeetingsUtil.parseDefaultSiteFromMeetingPreferences = function (userPreferences) {
|
|
84
65
|
var result = '';
|
|
85
|
-
|
|
86
66
|
if (userPreferences && userPreferences.sites) {
|
|
87
67
|
var defaultSite = userPreferences.sites.find(function (site) {
|
|
88
68
|
return site.default;
|
|
89
69
|
});
|
|
90
|
-
|
|
91
70
|
if (defaultSite) {
|
|
92
71
|
result = defaultSite.siteUrl;
|
|
93
72
|
}
|
|
94
73
|
}
|
|
95
|
-
|
|
96
74
|
return result;
|
|
97
75
|
};
|
|
76
|
+
|
|
98
77
|
/**
|
|
99
78
|
* Will check to see if the H.264 media codec is supported.
|
|
100
79
|
* @async
|
|
101
80
|
* @private
|
|
102
81
|
* @returns {Promise<boolean>}
|
|
103
82
|
*/
|
|
104
|
-
|
|
105
|
-
|
|
106
83
|
MeetingsUtil.hasH264Codec = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
107
84
|
var hasCodec, pc, offer;
|
|
108
85
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
109
|
-
while (1) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
_loggerProxy.default.logger.warn('Meetings:util#hasH264Codec --> Error creating peerConnection for H.264 test.');
|
|
136
|
-
|
|
137
|
-
case 13:
|
|
138
|
-
return _context.abrupt("return", hasCodec);
|
|
139
|
-
|
|
140
|
-
case 14:
|
|
141
|
-
case "end":
|
|
142
|
-
return _context.stop();
|
|
143
|
-
}
|
|
86
|
+
while (1) switch (_context.prev = _context.next) {
|
|
87
|
+
case 0:
|
|
88
|
+
hasCodec = false;
|
|
89
|
+
_context.prev = 1;
|
|
90
|
+
pc = new window.RTCPeerConnection();
|
|
91
|
+
_context.next = 5;
|
|
92
|
+
return pc.createOffer({
|
|
93
|
+
offerToReceiveVideo: true
|
|
94
|
+
});
|
|
95
|
+
case 5:
|
|
96
|
+
offer = _context.sent;
|
|
97
|
+
if (offer.sdp.match(/^a=rtpmap:\d+\s+H264\/\d+/m)) {
|
|
98
|
+
hasCodec = true;
|
|
99
|
+
}
|
|
100
|
+
pc.close();
|
|
101
|
+
_context.next = 13;
|
|
102
|
+
break;
|
|
103
|
+
case 10:
|
|
104
|
+
_context.prev = 10;
|
|
105
|
+
_context.t0 = _context["catch"](1);
|
|
106
|
+
_loggerProxy.default.logger.warn('Meetings:util#hasH264Codec --> Error creating peerConnection for H.264 test.');
|
|
107
|
+
case 13:
|
|
108
|
+
return _context.abrupt("return", hasCodec);
|
|
109
|
+
case 14:
|
|
110
|
+
case "end":
|
|
111
|
+
return _context.stop();
|
|
144
112
|
}
|
|
145
113
|
}, _callee, null, [[1, 10]]);
|
|
146
114
|
}));
|
|
115
|
+
|
|
147
116
|
/**
|
|
148
117
|
* Notifies the user whether or not the H.264
|
|
149
118
|
* codec is present. Will continuously check
|
|
@@ -155,97 +124,74 @@ MeetingsUtil.hasH264Codec = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__P
|
|
|
155
124
|
* @param {boolean} options.disableNotifications Default is false. Boolean to enable/disable notification and events
|
|
156
125
|
* @returns {undefined}
|
|
157
126
|
*/
|
|
158
|
-
|
|
159
127
|
MeetingsUtil.checkH264Support = /*#__PURE__*/function () {
|
|
160
128
|
var _checkH264Support = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(options) {
|
|
161
129
|
var _this = this;
|
|
162
|
-
|
|
163
130
|
var hasH264Codec, _ref2, firstChecked, disableNotifications, delay, maxDuration, shouldTrigger, shouldStopChecking;
|
|
164
|
-
|
|
165
131
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
166
|
-
while (1) {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
132
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
133
|
+
case 0:
|
|
134
|
+
hasH264Codec = MeetingsUtil.hasH264Codec;
|
|
135
|
+
_ref2 = options || {}, firstChecked = _ref2.firstChecked, disableNotifications = _ref2.disableNotifications;
|
|
136
|
+
delay = 5e3; // ms
|
|
137
|
+
maxDuration = 3e5; // ms
|
|
138
|
+
shouldTrigger = firstChecked === undefined;
|
|
139
|
+
shouldStopChecking = firstChecked && (0, _now.default)() - firstChecked >= maxDuration; // Disable notifications and start H.264 download only
|
|
140
|
+
if (!disableNotifications) {
|
|
141
|
+
_context2.next = 9;
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
hasH264Codec();
|
|
145
|
+
return _context2.abrupt("return");
|
|
146
|
+
case 9:
|
|
147
|
+
_context2.next = 11;
|
|
148
|
+
return hasH264Codec();
|
|
149
|
+
case 11:
|
|
150
|
+
if (!_context2.sent) {
|
|
151
|
+
_context2.next = 15;
|
|
152
|
+
break;
|
|
153
|
+
}
|
|
154
|
+
_triggerProxy.default.trigger(this, {
|
|
155
|
+
file: 'meetings/util',
|
|
156
|
+
function: 'checkH264Support'
|
|
157
|
+
}, _constants.EVENT_TRIGGERS.MEDIA_CODEC_LOADED);
|
|
158
|
+
_loggerProxy.default.logger.log('Meetings:util#checkH264Support --> H264 codec loaded successfully.');
|
|
159
|
+
return _context2.abrupt("return");
|
|
160
|
+
case 15:
|
|
161
|
+
if (!shouldStopChecking) {
|
|
162
|
+
_context2.next = 18;
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
_loggerProxy.default.logger.error('Meetings:util#checkH264Support --> Timed out waiting for H264 codec to load.');
|
|
166
|
+
return _context2.abrupt("return");
|
|
167
|
+
case 18:
|
|
168
|
+
// Trigger only once
|
|
169
|
+
if (shouldTrigger) {
|
|
196
170
|
_triggerProxy.default.trigger(this, {
|
|
197
171
|
file: 'meetings/util',
|
|
198
172
|
function: 'checkH264Support'
|
|
199
|
-
}, _constants.EVENT_TRIGGERS.
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
return _context2.abrupt("return");
|
|
204
|
-
|
|
205
|
-
case 15:
|
|
206
|
-
if (!shouldStopChecking) {
|
|
207
|
-
_context2.next = 18;
|
|
208
|
-
break;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
_loggerProxy.default.logger.error('Meetings:util#checkH264Support --> Timed out waiting for H264 codec to load.');
|
|
212
|
-
|
|
213
|
-
return _context2.abrupt("return");
|
|
214
|
-
|
|
215
|
-
case 18:
|
|
216
|
-
// Trigger only once
|
|
217
|
-
if (shouldTrigger) {
|
|
218
|
-
_triggerProxy.default.trigger(this, {
|
|
219
|
-
file: 'meetings/util',
|
|
220
|
-
function: 'checkH264Support'
|
|
221
|
-
}, _constants.EVENT_TRIGGERS.MEDIA_CODEC_MISSING);
|
|
222
|
-
|
|
223
|
-
_loggerProxy.default.logger.log('Meetings:util#checkH264Support --> H264 codec is missing.');
|
|
224
|
-
} // Keep checking in intervals to see if codec loaded
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
window.setTimeout(function () {
|
|
228
|
-
var timestamp = firstChecked || (0, _now.default)();
|
|
229
|
-
MeetingsUtil.checkH264Support.call(_this, {
|
|
230
|
-
firstChecked: timestamp
|
|
231
|
-
});
|
|
232
|
-
}, delay);
|
|
173
|
+
}, _constants.EVENT_TRIGGERS.MEDIA_CODEC_MISSING);
|
|
174
|
+
_loggerProxy.default.logger.log('Meetings:util#checkH264Support --> H264 codec is missing.');
|
|
175
|
+
}
|
|
233
176
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
177
|
+
// Keep checking in intervals to see if codec loaded
|
|
178
|
+
window.setTimeout(function () {
|
|
179
|
+
var timestamp = firstChecked || (0, _now.default)();
|
|
180
|
+
MeetingsUtil.checkH264Support.call(_this, {
|
|
181
|
+
firstChecked: timestamp
|
|
182
|
+
});
|
|
183
|
+
}, delay);
|
|
184
|
+
case 20:
|
|
185
|
+
case "end":
|
|
186
|
+
return _context2.stop();
|
|
238
187
|
}
|
|
239
188
|
}, _callee2, this);
|
|
240
189
|
}));
|
|
241
|
-
|
|
242
190
|
function checkH264Support(_x) {
|
|
243
191
|
return _checkH264Support.apply(this, arguments);
|
|
244
192
|
}
|
|
245
|
-
|
|
246
193
|
return checkH264Support;
|
|
247
194
|
}();
|
|
248
|
-
|
|
249
195
|
var _default = MeetingsUtil;
|
|
250
196
|
exports.default = _default;
|
|
251
197
|
//# sourceMappingURL=util.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeetingsUtil","getMeetingAddedType","type","_LOCUS_ID_","_INCOMING_","_CREATED_","handleRoapMercury","envelope","meetingCollection","data","eventType","LOCUSEVENT","MESSAGE_ROAP","meeting","getByKey","CORRELATION_ID","correlationId","roap","roapEvent","checkForCorrelationId","deviceUrl","locus","devices","self","foundDevice","find","device","url","parseDefaultSiteFromMeetingPreferences","userPreferences","result","sites","defaultSite","site","default","siteUrl","hasH264Codec","hasCodec","pc","window","RTCPeerConnection","createOffer","offerToReceiveVideo","offer","sdp","match","close","LoggerProxy","logger","warn","checkH264Support","options","firstChecked","disableNotifications","delay","maxDuration","shouldTrigger","undefined","shouldStopChecking","Trigger","trigger","file","function","EVENT_TRIGGERS","MEDIA_CODEC_LOADED","log","error","MEDIA_CODEC_MISSING","setTimeout","timestamp","call"],"sources":["util.ts"],"sourcesContent":["/* globals window */\n\nimport {\n _LOCUS_ID_,\n _INCOMING_,\n _CREATED_,\n LOCUSEVENT,\n CORRELATION_ID,\n EVENT_TRIGGERS
|
|
1
|
+
{"version":3,"names":["MeetingsUtil","getMeetingAddedType","type","_LOCUS_ID_","_INCOMING_","_CREATED_","handleRoapMercury","envelope","meetingCollection","data","eventType","LOCUSEVENT","MESSAGE_ROAP","meeting","getByKey","CORRELATION_ID","correlationId","roap","roapEvent","checkForCorrelationId","deviceUrl","locus","devices","self","foundDevice","find","device","url","parseDefaultSiteFromMeetingPreferences","userPreferences","result","sites","defaultSite","site","default","siteUrl","hasH264Codec","hasCodec","pc","window","RTCPeerConnection","createOffer","offerToReceiveVideo","offer","sdp","match","close","LoggerProxy","logger","warn","checkH264Support","options","firstChecked","disableNotifications","delay","maxDuration","shouldTrigger","undefined","shouldStopChecking","Trigger","trigger","file","function","EVENT_TRIGGERS","MEDIA_CODEC_LOADED","log","error","MEDIA_CODEC_MISSING","setTimeout","timestamp","call"],"sources":["util.ts"],"sourcesContent":["/* globals window */\n\nimport {\n _LOCUS_ID_,\n _INCOMING_,\n _CREATED_,\n LOCUSEVENT,\n CORRELATION_ID,\n EVENT_TRIGGERS,\n} from '../constants';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport Trigger from '../common/events/trigger-proxy';\n\n/**\n * Meetings Media Codec Missing Event\n * Emitted when H.264 codec is not\n * found in the browser.\n * @event media:codec:missing\n * @instance\n * @memberof MeetingsUtil\n */\n\n/**\n * Meetings Media Codec Loaded Event\n * Emitted when H.264 codec has been\n * loaded in the browser.\n * @event media:codec:loaded\n * @instance\n * @memberof MeetingsUtil\n */\n\nconst MeetingsUtil: any = {};\n\nMeetingsUtil.getMeetingAddedType = (type) => (type === _LOCUS_ID_ ? _INCOMING_ : _CREATED_);\n\nMeetingsUtil.handleRoapMercury = (envelope, meetingCollection) => {\n const {data} = envelope;\n const {eventType} = data;\n\n if (eventType === LOCUSEVENT.MESSAGE_ROAP) {\n const meeting = meetingCollection.getByKey(CORRELATION_ID, data.correlationId);\n\n if (meeting) {\n meeting.roap.roapEvent(data);\n }\n }\n};\n\nMeetingsUtil.checkForCorrelationId = (deviceUrl, locus) => {\n let devices = [];\n\n if (locus) {\n if (locus && locus.self && locus.self.devices) {\n devices = locus.self.devices;\n }\n\n const foundDevice = devices.find((device) => device.url === deviceUrl);\n\n if (foundDevice && foundDevice.correlationId) {\n return foundDevice.correlationId;\n }\n }\n\n return false;\n};\n\nMeetingsUtil.parseDefaultSiteFromMeetingPreferences = (userPreferences) => {\n let result = '';\n\n if (userPreferences && userPreferences.sites) {\n const defaultSite = userPreferences.sites.find((site) => site.default);\n\n if (defaultSite) {\n result = defaultSite.siteUrl;\n }\n }\n\n return result;\n};\n\n/**\n * Will check to see if the H.264 media codec is supported.\n * @async\n * @private\n * @returns {Promise<boolean>}\n */\nMeetingsUtil.hasH264Codec = async () => {\n let hasCodec = false;\n\n try {\n const pc = new window.RTCPeerConnection();\n const offer = await pc.createOffer({offerToReceiveVideo: true});\n\n if (offer.sdp.match(/^a=rtpmap:\\d+\\s+H264\\/\\d+/m)) {\n hasCodec = true;\n }\n pc.close();\n } catch (error) {\n LoggerProxy.logger.warn(\n 'Meetings:util#hasH264Codec --> Error creating peerConnection for H.264 test.'\n );\n }\n\n return hasCodec;\n};\n\n/**\n * Notifies the user whether or not the H.264\n * codec is present. Will continuously check\n * until max duration.\n * @async\n * @private\n * @param {object} options\n * @param {Number} options.firstChecked Timestamp in milliseconds\n * @param {boolean} options.disableNotifications Default is false. Boolean to enable/disable notification and events\n * @returns {undefined}\n */\nMeetingsUtil.checkH264Support = async function checkH264Support(options: {\n firstChecked: number;\n disableNotifications: boolean;\n}) {\n const {hasH264Codec} = MeetingsUtil;\n const {firstChecked, disableNotifications} = options || {};\n const delay = 5e3; // ms\n const maxDuration = 3e5; // ms\n const shouldTrigger = firstChecked === undefined;\n const shouldStopChecking = firstChecked && Date.now() - firstChecked >= maxDuration;\n\n // Disable notifications and start H.264 download only\n if (disableNotifications) {\n hasH264Codec();\n\n return;\n }\n\n // Codec loaded trigger event notification\n if (await hasH264Codec()) {\n Trigger.trigger(\n this,\n {\n file: 'meetings/util',\n function: 'checkH264Support',\n },\n EVENT_TRIGGERS.MEDIA_CODEC_LOADED\n );\n LoggerProxy.logger.log('Meetings:util#checkH264Support --> H264 codec loaded successfully.');\n\n return;\n }\n\n // Stop checking if past the timelimit\n if (shouldStopChecking) {\n LoggerProxy.logger.error(\n 'Meetings:util#checkH264Support --> Timed out waiting for H264 codec to load.'\n );\n\n return;\n }\n\n // Trigger only once\n if (shouldTrigger) {\n Trigger.trigger(\n this,\n {\n file: 'meetings/util',\n function: 'checkH264Support',\n },\n EVENT_TRIGGERS.MEDIA_CODEC_MISSING\n );\n LoggerProxy.logger.log('Meetings:util#checkH264Support --> H264 codec is missing.');\n }\n\n // Keep checking in intervals to see if codec loaded\n window.setTimeout(() => {\n const timestamp = firstChecked || Date.now();\n\n MeetingsUtil.checkH264Support.call(this, {firstChecked: timestamp});\n }, delay);\n};\n\nexport default MeetingsUtil;\n"],"mappings":";;;;;;;;;;;AAEA;AAQA;AACA;AAXA;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAMA,YAAiB,GAAG,CAAC,CAAC;AAE5BA,YAAY,CAACC,mBAAmB,GAAG,UAACC,IAAI;EAAA,OAAMA,IAAI,KAAKC,qBAAU,GAAGC,qBAAU,GAAGC,oBAAS;AAAA,CAAC;AAE3FL,YAAY,CAACM,iBAAiB,GAAG,UAACC,QAAQ,EAAEC,iBAAiB,EAAK;EAChE,IAAOC,IAAI,GAAIF,QAAQ,CAAhBE,IAAI;EACX,IAAOC,SAAS,GAAID,IAAI,CAAjBC,SAAS;EAEhB,IAAIA,SAAS,KAAKC,qBAAU,CAACC,YAAY,EAAE;IACzC,IAAMC,OAAO,GAAGL,iBAAiB,CAACM,QAAQ,CAACC,yBAAc,EAAEN,IAAI,CAACO,aAAa,CAAC;IAE9E,IAAIH,OAAO,EAAE;MACXA,OAAO,CAACI,IAAI,CAACC,SAAS,CAACT,IAAI,CAAC;IAC9B;EACF;AACF,CAAC;AAEDT,YAAY,CAACmB,qBAAqB,GAAG,UAACC,SAAS,EAAEC,KAAK,EAAK;EACzD,IAAIC,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