@webex/plugin-meetings 3.1.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/common/errors/{reconnection-in-progress.js → reconnection-not-started.js} +27 -15
- package/dist/common/errors/reconnection-not-started.js.map +1 -0
- package/dist/constants.js +12 -3
- package/dist/constants.js.map +1 -1
- package/dist/index.js +80 -0
- package/dist/index.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +7 -1
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +10 -0
- package/dist/locus-info/index.js.map +1 -1
- package/dist/media/properties.js +102 -57
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +6 -0
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +543 -467
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +27 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/util.js +9 -16
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.js +37 -49
- package/dist/meeting/voicea-meeting.js.map +1 -1
- package/dist/meeting-info/util.js +304 -267
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +334 -298
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/index.js +6 -27
- package/dist/meetings/index.js.map +1 -1
- package/dist/reachability/index.js +6 -0
- package/dist/reachability/index.js.map +1 -1
- package/dist/reconnection-manager/index.js +138 -109
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/roap/request.js +3 -27
- package/dist/roap/request.js.map +1 -1
- package/dist/statsAnalyzer/index.js +4 -0
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +3 -0
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/types/common/errors/reconnection-not-started.d.ts +13 -0
- package/dist/{constants.d.ts → types/constants.d.ts} +11 -2
- package/dist/types/index.d.ts +19 -0
- package/dist/{media → types/media}/properties.d.ts +26 -2
- package/dist/{meeting → types/meeting}/in-meeting-actions.d.ts +6 -0
- package/dist/{meeting → types/meeting}/index.d.ts +5 -6
- package/dist/{meeting → types/meeting}/locusMediaRequest.d.ts +1 -0
- package/dist/{meeting → types/meeting}/util.d.ts +3 -0
- package/dist/{meeting → types/meeting}/voicea-meeting.d.ts +3 -2
- package/dist/{meeting-info → types/meeting-info}/index.d.ts +1 -1
- package/dist/{meeting-info → types/meeting-info}/meeting-info-v2.d.ts +1 -1
- package/dist/types/meeting-info/util.d.ts +49 -0
- package/dist/types/meeting-info/utilv2.d.ts +65 -0
- package/dist/{meetings → types/meetings}/index.d.ts +1 -16
- package/dist/{reconnection-manager → types/reconnection-manager}/index.d.ts +4 -14
- package/dist/webinar/index.js +1 -1
- package/package.json +22 -22
- package/src/common/errors/reconnection-not-started.ts +25 -0
- package/src/constants.ts +12 -4
- package/src/index.ts +30 -0
- package/src/locus-info/controlsUtils.ts +11 -0
- package/src/locus-info/index.ts +16 -0
- package/src/media/properties.ts +67 -15
- package/src/meeting/in-meeting-actions.ts +12 -0
- package/src/meeting/index.ts +121 -98
- package/src/meeting/locusMediaRequest.ts +31 -0
- package/src/meeting/util.ts +9 -16
- package/src/meeting/voicea-meeting.ts +44 -46
- package/src/meeting-info/util.ts +241 -233
- package/src/meeting-info/utilv2.ts +250 -244
- package/src/meetings/index.ts +8 -25
- package/src/reachability/index.ts +3 -0
- package/src/reconnection-manager/index.ts +128 -105
- package/src/roap/request.ts +1 -24
- package/src/statsAnalyzer/index.ts +4 -0
- package/src/statsAnalyzer/mqaUtil.ts +5 -0
- package/test/unit/spec/locus-info/controlsUtils.js +20 -0
- package/test/unit/spec/locus-info/index.js +21 -0
- package/test/unit/spec/media/properties.ts +145 -140
- package/test/unit/spec/meeting/in-meeting-actions.ts +6 -0
- package/test/unit/spec/meeting/index.js +243 -97
- package/test/unit/spec/meeting/locusMediaRequest.ts +49 -0
- package/test/unit/spec/meeting/utils.js +3 -10
- package/test/unit/spec/meeting/voicea-meeting.ts +5 -14
- package/test/unit/spec/meetings/index.js +27 -8
- package/test/unit/spec/reconnection-manager/index.js +127 -39
- package/test/unit/spec/roap/request.ts +0 -37
- package/test/unit/spec/stats-analyzer/index.js +11 -0
- package/dist/common/errors/reconnection-in-progress.d.ts +0 -9
- package/dist/common/errors/reconnection-in-progress.js.map +0 -1
- package/dist/index.d.ts +0 -7
- package/dist/meeting-info/util.d.ts +0 -2
- package/dist/meeting-info/utilv2.d.ts +0 -2
- package/src/common/errors/reconnection-in-progress.ts +0 -8
- /package/dist/{annotation → types/annotation}/annotation.types.d.ts +0 -0
- /package/dist/{annotation → types/annotation}/constants.d.ts +0 -0
- /package/dist/{annotation → types/annotation}/index.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/breakout.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/collection.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/edit-lock-error.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/events.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/index.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/request.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/utils.d.ts +0 -0
- /package/dist/{common → types/common}/browser-detection.d.ts +0 -0
- /package/dist/{common → types/common}/collection.d.ts +0 -0
- /package/dist/{common → types/common}/config.d.ts +0 -0
- /package/dist/{common → types/common}/errors/captcha-error.d.ts +0 -0
- /package/dist/{common → types/common}/errors/intent-to-join.d.ts +0 -0
- /package/dist/{common → types/common}/errors/join-meeting.d.ts +0 -0
- /package/dist/{common → types/common}/errors/media.d.ts +0 -0
- /package/dist/{common → types/common}/errors/no-meeting-info.d.ts +0 -0
- /package/dist/{common → types/common}/errors/parameter.d.ts +0 -0
- /package/dist/{common → types/common}/errors/password-error.d.ts +0 -0
- /package/dist/{common → types/common}/errors/permission.d.ts +0 -0
- /package/dist/{common → types/common}/errors/reclaim-host-role-errors.d.ts +0 -0
- /package/dist/{common → types/common}/errors/reconnection.d.ts +0 -0
- /package/dist/{common → types/common}/errors/stats.d.ts +0 -0
- /package/dist/{common → types/common}/errors/webex-errors.d.ts +0 -0
- /package/dist/{common → types/common}/errors/webex-meetings-error.d.ts +0 -0
- /package/dist/{common → types/common}/events/events-scope.d.ts +0 -0
- /package/dist/{common → types/common}/events/events.d.ts +0 -0
- /package/dist/{common → types/common}/events/trigger-proxy.d.ts +0 -0
- /package/dist/{common → types/common}/events/util.d.ts +0 -0
- /package/dist/{common → types/common}/logs/logger-config.d.ts +0 -0
- /package/dist/{common → types/common}/logs/logger-proxy.d.ts +0 -0
- /package/dist/{common → types/common}/logs/request.d.ts +0 -0
- /package/dist/{common → types/common}/queue.d.ts +0 -0
- /package/dist/{config.d.ts → types/config.d.ts} +0 -0
- /package/dist/{controls-options-manager → types/controls-options-manager}/constants.d.ts +0 -0
- /package/dist/{controls-options-manager → types/controls-options-manager}/enums.d.ts +0 -0
- /package/dist/{controls-options-manager → types/controls-options-manager}/index.d.ts +0 -0
- /package/dist/{controls-options-manager → types/controls-options-manager}/types.d.ts +0 -0
- /package/dist/{controls-options-manager → types/controls-options-manager}/util.d.ts +0 -0
- /package/dist/{interceptors → types/interceptors}/index.d.ts +0 -0
- /package/dist/{interceptors → types/interceptors}/locusRetry.d.ts +0 -0
- /package/dist/{interpretation → types/interpretation}/collection.d.ts +0 -0
- /package/dist/{interpretation → types/interpretation}/index.d.ts +0 -0
- /package/dist/{interpretation → types/interpretation}/siLanguage.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/controlsUtils.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/embeddedAppsUtils.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/fullState.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/hostUtils.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/index.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/infoUtils.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/mediaSharesUtils.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/parser.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/selfUtils.d.ts +0 -0
- /package/dist/{media → types/media}/MediaConnectionAwaiter.d.ts +0 -0
- /package/dist/{media → types/media}/index.d.ts +0 -0
- /package/dist/{media → types/media}/util.d.ts +0 -0
- /package/dist/{mediaQualityMetrics → types/mediaQualityMetrics}/config.d.ts +0 -0
- /package/dist/{meeting → types/meeting}/muteState.d.ts +0 -0
- /package/dist/{meeting → types/meeting}/request.d.ts +0 -0
- /package/dist/{meeting → types/meeting}/request.type.d.ts +0 -0
- /package/dist/{meeting → types/meeting}/state.d.ts +0 -0
- /package/dist/{meeting-info → types/meeting-info}/collection.d.ts +0 -0
- /package/dist/{meeting-info → types/meeting-info}/request.d.ts +0 -0
- /package/dist/{meetings → types/meetings}/collection.d.ts +0 -0
- /package/dist/{meetings → types/meetings}/meetings.types.d.ts +0 -0
- /package/dist/{meetings → types/meetings}/request.d.ts +0 -0
- /package/dist/{meetings → types/meetings}/util.d.ts +0 -0
- /package/dist/{member → types/member}/index.d.ts +0 -0
- /package/dist/{member → types/member}/types.d.ts +0 -0
- /package/dist/{member → types/member}/util.d.ts +0 -0
- /package/dist/{members → types/members}/collection.d.ts +0 -0
- /package/dist/{members → types/members}/index.d.ts +0 -0
- /package/dist/{members → types/members}/request.d.ts +0 -0
- /package/dist/{members → types/members}/types.d.ts +0 -0
- /package/dist/{members → types/members}/util.d.ts +0 -0
- /package/dist/{metrics → types/metrics}/constants.d.ts +0 -0
- /package/dist/{metrics → types/metrics}/index.d.ts +0 -0
- /package/dist/{multistream → types/multistream}/mediaRequestManager.d.ts +0 -0
- /package/dist/{multistream → types/multistream}/receiveSlot.d.ts +0 -0
- /package/dist/{multistream → types/multistream}/receiveSlotManager.d.ts +0 -0
- /package/dist/{multistream → types/multistream}/remoteMedia.d.ts +0 -0
- /package/dist/{multistream → types/multistream}/remoteMediaGroup.d.ts +0 -0
- /package/dist/{multistream → types/multistream}/remoteMediaManager.d.ts +0 -0
- /package/dist/{multistream → types/multistream}/sendSlotManager.d.ts +0 -0
- /package/dist/{networkQualityMonitor → types/networkQualityMonitor}/index.d.ts +0 -0
- /package/dist/{personal-meeting-room → types/personal-meeting-room}/index.d.ts +0 -0
- /package/dist/{personal-meeting-room → types/personal-meeting-room}/request.d.ts +0 -0
- /package/dist/{personal-meeting-room → types/personal-meeting-room}/util.d.ts +0 -0
- /package/dist/{reachability → types/reachability}/clusterReachability.d.ts +0 -0
- /package/dist/{reachability → types/reachability}/index.d.ts +0 -0
- /package/dist/{reachability → types/reachability}/request.d.ts +0 -0
- /package/dist/{reachability → types/reachability}/util.d.ts +0 -0
- /package/dist/{reactions → types/reactions}/constants.d.ts +0 -0
- /package/dist/{reactions → types/reactions}/reactions.d.ts +0 -0
- /package/dist/{reactions → types/reactions}/reactions.type.d.ts +0 -0
- /package/dist/{recording-controller → types/recording-controller}/enums.d.ts +0 -0
- /package/dist/{recording-controller → types/recording-controller}/index.d.ts +0 -0
- /package/dist/{recording-controller → types/recording-controller}/util.d.ts +0 -0
- /package/dist/{roap → types/roap}/index.d.ts +0 -0
- /package/dist/{roap → types/roap}/request.d.ts +0 -0
- /package/dist/{roap → types/roap}/turnDiscovery.d.ts +0 -0
- /package/dist/{rtcMetrics → types/rtcMetrics}/constants.d.ts +0 -0
- /package/dist/{rtcMetrics → types/rtcMetrics}/index.d.ts +0 -0
- /package/dist/{statsAnalyzer → types/statsAnalyzer}/global.d.ts +0 -0
- /package/dist/{statsAnalyzer → types/statsAnalyzer}/index.d.ts +0 -0
- /package/dist/{statsAnalyzer → types/statsAnalyzer}/mqaUtil.d.ts +0 -0
- /package/dist/{transcription → types/transcription}/index.d.ts +0 -0
- /package/dist/{webinar → types/webinar}/collection.d.ts +0 -0
- /package/dist/{webinar → types/webinar}/index.d.ts +0 -0
|
@@ -54,189 +54,194 @@ describe('MediaProperties', () => {
|
|
|
54
54
|
});
|
|
55
55
|
});
|
|
56
56
|
|
|
57
|
-
describe('
|
|
58
|
-
it('
|
|
59
|
-
|
|
57
|
+
describe('getCurrentConnectionInfo', () => {
|
|
58
|
+
it('handles the case when getStats() fails', async () => {
|
|
59
|
+
mockMC.getStats.rejects(new Error());
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
const {connectionType, selectedCandidatePairChanges, numTransports} =
|
|
62
|
+
await mediaProperties.getCurrentConnectionInfo();
|
|
62
63
|
|
|
63
|
-
assert.
|
|
64
|
+
assert.equal(connectionType, 'unknown');
|
|
65
|
+
assert.equal(selectedCandidatePairChanges, -1);
|
|
66
|
+
assert.equal(numTransports, 0);
|
|
64
67
|
});
|
|
65
|
-
it('calls getStats() only after waitForMediaConnectionConnected resolves', async () => {
|
|
66
|
-
const waitForMediaConnectionConnectedResult = new Defer();
|
|
67
|
-
|
|
68
|
-
const waitForMediaConnectionConnectedStub = sinon
|
|
69
|
-
.stub(mediaProperties, 'waitForMediaConnectionConnected')
|
|
70
|
-
.returns(waitForMediaConnectionConnectedResult.promise);
|
|
71
|
-
|
|
72
|
-
const result = mediaProperties.getCurrentConnectionType();
|
|
73
68
|
|
|
74
|
-
|
|
69
|
+
describe('selectedCandidatePairChanges and numTransports', () => {
|
|
70
|
+
it('returns correct values when getStats() returns no transport stats at all', async () => {
|
|
71
|
+
mockMC.getStats.resolves([{type: 'something', id: '1234'}]);
|
|
75
72
|
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
const {selectedCandidatePairChanges, numTransports} =
|
|
74
|
+
await mediaProperties.getCurrentConnectionInfo();
|
|
78
75
|
|
|
79
|
-
|
|
80
|
-
|
|
76
|
+
assert.equal(selectedCandidatePairChanges, -1);
|
|
77
|
+
assert.equal(numTransports, 0);
|
|
78
|
+
});
|
|
81
79
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
});
|
|
85
|
-
it('rejects if waitForMediaConnectionConnected rejects', async () => {
|
|
86
|
-
const waitForMediaConnectionConnectedResult = new Defer();
|
|
80
|
+
it('returns correct values when getStats() returns transport stats without selectedCandidatePairChanges', async () => {
|
|
81
|
+
mockMC.getStats.resolves([{type: 'transport', id: '1234'}]);
|
|
87
82
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
.returns(waitForMediaConnectionConnectedResult.promise);
|
|
83
|
+
const {selectedCandidatePairChanges, numTransports} =
|
|
84
|
+
await mediaProperties.getCurrentConnectionInfo();
|
|
91
85
|
|
|
92
|
-
|
|
86
|
+
assert.equal(selectedCandidatePairChanges, -1);
|
|
87
|
+
assert.equal(numTransports, 1);
|
|
88
|
+
});
|
|
93
89
|
|
|
94
|
-
|
|
90
|
+
it('returns correct values when getStats() returns transport stats with selectedCandidatePairChanges', async () => {
|
|
91
|
+
mockMC.getStats.resolves([
|
|
92
|
+
{type: 'transport', id: '1234', selectedCandidatePairChanges: 13},
|
|
93
|
+
]);
|
|
95
94
|
|
|
96
|
-
|
|
95
|
+
const {selectedCandidatePairChanges, numTransports} =
|
|
96
|
+
await mediaProperties.getCurrentConnectionInfo();
|
|
97
97
|
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
assert.equal(selectedCandidatePairChanges, 13);
|
|
99
|
+
assert.equal(numTransports, 1);
|
|
100
|
+
});
|
|
100
101
|
|
|
101
|
-
|
|
102
|
+
it('returns correct values when getStats() returns multiple transport stats', async () => {
|
|
103
|
+
mockMC.getStats.resolves([
|
|
104
|
+
{type: 'transport', id: '1', selectedCandidatePairChanges: 11},
|
|
105
|
+
{type: 'transport', id: '2', selectedCandidatePairChanges: 12},
|
|
106
|
+
]);
|
|
102
107
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
it('returns "unknown" if getStats() fails', async () => {
|
|
106
|
-
mockMC.getStats.rejects(new Error());
|
|
108
|
+
const {selectedCandidatePairChanges, numTransports} =
|
|
109
|
+
await mediaProperties.getCurrentConnectionInfo();
|
|
107
110
|
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
assert.equal(selectedCandidatePairChanges, 11); // we expect stats from the first transport to be returned
|
|
112
|
+
assert.equal(numTransports, 2);
|
|
113
|
+
});
|
|
110
114
|
});
|
|
115
|
+
describe('connectionType', () => {
|
|
116
|
+
it('returns "unknown" if getStats() returns no candidate pairs', async () => {
|
|
117
|
+
mockMC.getStats.resolves([{type: 'something', id: '1234'}]);
|
|
111
118
|
|
|
112
|
-
|
|
113
|
-
|
|
119
|
+
const {connectionType} = await mediaProperties.getCurrentConnectionInfo();
|
|
120
|
+
assert.equal(connectionType, 'unknown');
|
|
121
|
+
});
|
|
114
122
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
});
|
|
123
|
+
it('returns "unknown" if getStats() returns no successful candidate pair', async () => {
|
|
124
|
+
mockMC.getStats.resolves([{type: 'candidate-pair', id: '1234', state: 'inprogress'}]);
|
|
118
125
|
|
|
119
|
-
|
|
120
|
-
|
|
126
|
+
const {connectionType} = await mediaProperties.getCurrentConnectionInfo();
|
|
127
|
+
assert.equal(connectionType, 'unknown');
|
|
128
|
+
});
|
|
121
129
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
130
|
+
it('returns "unknown" if getStats() returns a successful candidate pair but local candidate is missing', async () => {
|
|
131
|
+
mockMC.getStats.resolves([
|
|
132
|
+
{type: 'candidate-pair', id: '1234', state: 'succeeded', localCandidateId: 'wrong id'},
|
|
133
|
+
]);
|
|
125
134
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
]);
|
|
135
|
+
const {connectionType} = await mediaProperties.getCurrentConnectionInfo();
|
|
136
|
+
assert.equal(connectionType, 'unknown');
|
|
137
|
+
});
|
|
130
138
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
139
|
+
it('returns "UDP" if getStats() returns a successful candidate pair with udp local candidate', async () => {
|
|
140
|
+
mockMC.getStats.resolves([
|
|
141
|
+
{
|
|
142
|
+
type: 'candidate-pair',
|
|
143
|
+
id: 'some candidate pair id',
|
|
144
|
+
state: 'succeeded',
|
|
145
|
+
localCandidateId: 'local candidate id',
|
|
146
|
+
},
|
|
147
|
+
{type: 'local-candidate', id: 'some other candidate id', protocol: 'tcp'},
|
|
148
|
+
{type: 'local-candidate', id: 'local candidate id', protocol: 'udp'},
|
|
149
|
+
]);
|
|
134
150
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
type: 'candidate-pair',
|
|
139
|
-
id: 'some candidate pair id',
|
|
140
|
-
state: 'succeeded',
|
|
141
|
-
localCandidateId: 'local candidate id',
|
|
142
|
-
},
|
|
143
|
-
{type: 'local-candidate', id: 'some other candidate id', protocol: 'tcp'},
|
|
144
|
-
{type: 'local-candidate', id: 'local candidate id', protocol: 'udp'},
|
|
145
|
-
]);
|
|
146
|
-
|
|
147
|
-
const connectionType = await mediaProperties.getCurrentConnectionType();
|
|
148
|
-
assert.equal(connectionType, 'UDP');
|
|
149
|
-
});
|
|
151
|
+
const {connectionType} = await mediaProperties.getCurrentConnectionInfo();
|
|
152
|
+
assert.equal(connectionType, 'UDP');
|
|
153
|
+
});
|
|
150
154
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
const connectionType = await mediaProperties.getCurrentConnectionType();
|
|
164
|
-
assert.equal(connectionType, 'TCP');
|
|
165
|
-
});
|
|
155
|
+
it('returns "TCP" if getStats() returns a successful candidate pair with tcp local candidate', async () => {
|
|
156
|
+
mockMC.getStats.resolves([
|
|
157
|
+
{
|
|
158
|
+
type: 'candidate-pair',
|
|
159
|
+
id: 'some candidate pair id',
|
|
160
|
+
state: 'succeeded',
|
|
161
|
+
localCandidateId: 'some candidate id',
|
|
162
|
+
},
|
|
163
|
+
{type: 'local-candidate', id: 'some other candidate id', protocol: 'udp'},
|
|
164
|
+
{type: 'local-candidate', id: 'some candidate id', protocol: 'tcp'},
|
|
165
|
+
]);
|
|
166
166
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
167
|
+
const {connectionType} = await mediaProperties.getCurrentConnectionInfo();
|
|
168
|
+
assert.equal(connectionType, 'TCP');
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
[
|
|
172
|
+
{relayProtocol: 'tls', expectedConnectionType: 'TURN-TLS'},
|
|
173
|
+
{relayProtocol: 'tcp', expectedConnectionType: 'TURN-TCP'},
|
|
174
|
+
{relayProtocol: 'udp', expectedConnectionType: 'TURN-UDP'},
|
|
175
|
+
].forEach(({relayProtocol, expectedConnectionType}) =>
|
|
176
|
+
it(`returns "${expectedConnectionType}" if getStats() returns a successful candidate pair with a local candidate with relayProtocol=${relayProtocol}`, async () => {
|
|
177
|
+
mockMC.getStats.resolves([
|
|
178
|
+
{
|
|
179
|
+
type: 'candidate-pair',
|
|
180
|
+
id: 'some candidate pair id',
|
|
181
|
+
state: 'succeeded',
|
|
182
|
+
localCandidateId: 'selected candidate id',
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
type: 'candidate-pair',
|
|
186
|
+
id: 'some other candidate pair id',
|
|
187
|
+
state: 'failed',
|
|
188
|
+
localCandidateId: 'some other candidate id 1',
|
|
189
|
+
},
|
|
190
|
+
{type: 'local-candidate', id: 'some other candidate id 1', protocol: 'udp'},
|
|
191
|
+
{type: 'local-candidate', id: 'some other candidate id 2', protocol: 'tcp'},
|
|
192
|
+
{
|
|
193
|
+
type: 'local-candidate',
|
|
194
|
+
id: 'selected candidate id',
|
|
195
|
+
protocol: 'udp',
|
|
196
|
+
relayProtocol,
|
|
197
|
+
},
|
|
198
|
+
]);
|
|
199
|
+
|
|
200
|
+
const {connectionType} = await mediaProperties.getCurrentConnectionInfo();
|
|
201
|
+
assert.equal(connectionType, expectedConnectionType);
|
|
202
|
+
})
|
|
203
|
+
);
|
|
204
|
+
|
|
205
|
+
it('returns connection type of the first successful candidate pair', async () => {
|
|
206
|
+
// in real life this will never happen and all active candidate pairs will have same transport,
|
|
207
|
+
// but here we're simulating a situation where they have different transports and just checking
|
|
208
|
+
// that the code still works and just returns the first one
|
|
173
209
|
mockMC.getStats.resolves([
|
|
210
|
+
{
|
|
211
|
+
type: 'inbound-rtp',
|
|
212
|
+
id: 'whatever',
|
|
213
|
+
},
|
|
174
214
|
{
|
|
175
215
|
type: 'candidate-pair',
|
|
176
216
|
id: 'some candidate pair id',
|
|
177
217
|
state: 'succeeded',
|
|
178
|
-
localCandidateId: 'selected candidate id',
|
|
218
|
+
localCandidateId: '1st selected candidate id',
|
|
179
219
|
},
|
|
180
220
|
{
|
|
181
221
|
type: 'candidate-pair',
|
|
182
222
|
id: 'some other candidate pair id',
|
|
183
|
-
state: '
|
|
184
|
-
localCandidateId: '
|
|
223
|
+
state: 'succeeded',
|
|
224
|
+
localCandidateId: '2nd selected candidate id',
|
|
185
225
|
},
|
|
186
226
|
{type: 'local-candidate', id: 'some other candidate id 1', protocol: 'udp'},
|
|
187
227
|
{type: 'local-candidate', id: 'some other candidate id 2', protocol: 'tcp'},
|
|
188
228
|
{
|
|
189
229
|
type: 'local-candidate',
|
|
190
|
-
id: 'selected candidate id',
|
|
230
|
+
id: '1st selected candidate id',
|
|
231
|
+
protocol: 'udp',
|
|
232
|
+
relayProtocol: 'tls',
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
type: 'local-candidate',
|
|
236
|
+
id: '2nd selected candidate id',
|
|
191
237
|
protocol: 'udp',
|
|
192
|
-
relayProtocol,
|
|
238
|
+
relayProtocol: 'tcp',
|
|
193
239
|
},
|
|
194
240
|
]);
|
|
195
241
|
|
|
196
|
-
const connectionType = await mediaProperties.
|
|
197
|
-
assert.equal(connectionType,
|
|
198
|
-
})
|
|
199
|
-
);
|
|
200
|
-
|
|
201
|
-
it('returns connection type of the first successful candidate pair', async () => {
|
|
202
|
-
// in real life this will never happen and all active candidate pairs will have same transport,
|
|
203
|
-
// but here we're simulating a situation where they have different transports and just checking
|
|
204
|
-
// that the code still works and just returns the first one
|
|
205
|
-
mockMC.getStats.resolves([
|
|
206
|
-
{
|
|
207
|
-
type: 'inbound-rtp',
|
|
208
|
-
id: 'whatever',
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
type: 'candidate-pair',
|
|
212
|
-
id: 'some candidate pair id',
|
|
213
|
-
state: 'succeeded',
|
|
214
|
-
localCandidateId: '1st selected candidate id',
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
type: 'candidate-pair',
|
|
218
|
-
id: 'some other candidate pair id',
|
|
219
|
-
state: 'succeeded',
|
|
220
|
-
localCandidateId: '2nd selected candidate id',
|
|
221
|
-
},
|
|
222
|
-
{type: 'local-candidate', id: 'some other candidate id 1', protocol: 'udp'},
|
|
223
|
-
{type: 'local-candidate', id: 'some other candidate id 2', protocol: 'tcp'},
|
|
224
|
-
{
|
|
225
|
-
type: 'local-candidate',
|
|
226
|
-
id: '1st selected candidate id',
|
|
227
|
-
protocol: 'udp',
|
|
228
|
-
relayProtocol: 'tls',
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
type: 'local-candidate',
|
|
232
|
-
id: '2nd selected candidate id',
|
|
233
|
-
protocol: 'udp',
|
|
234
|
-
relayProtocol: 'tcp',
|
|
235
|
-
},
|
|
236
|
-
]);
|
|
237
|
-
|
|
238
|
-
const connectionType = await mediaProperties.getCurrentConnectionType();
|
|
239
|
-
assert.equal(connectionType, 'TURN-TLS');
|
|
242
|
+
const {connectionType} = await mediaProperties.getCurrentConnectionInfo();
|
|
243
|
+
assert.equal(connectionType, 'TURN-TLS');
|
|
244
|
+
});
|
|
240
245
|
});
|
|
241
246
|
});
|
|
242
247
|
});
|
|
@@ -30,6 +30,9 @@ describe('plugin-meetings', () => {
|
|
|
30
30
|
canStartTranscribing: null,
|
|
31
31
|
canStopTranscribing: null,
|
|
32
32
|
isClosedCaptionActive: null,
|
|
33
|
+
canStartManualCaption: null,
|
|
34
|
+
canStopManualCaption: null,
|
|
35
|
+
isManualCaptionActive: null,
|
|
33
36
|
isSaveTranscriptsEnabled: null,
|
|
34
37
|
isWebexAssistantActive: null,
|
|
35
38
|
canViewCaptionPanel: null,
|
|
@@ -110,6 +113,9 @@ describe('plugin-meetings', () => {
|
|
|
110
113
|
'canEnableClosedCaption',
|
|
111
114
|
'canStopTranscribing',
|
|
112
115
|
'isClosedCaptionActive',
|
|
116
|
+
'canStartManualCaption',
|
|
117
|
+
'canStopManualCaption',
|
|
118
|
+
'isManualCaptionActive',
|
|
113
119
|
'isSaveTranscriptsEnabled',
|
|
114
120
|
'isWebexAssistantActive',
|
|
115
121
|
'canViewCaptionPanel',
|