@webex/plugin-meetings 2.35.0 → 3.0.0-beta.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/meeting/index.js +99 -79
- package/dist/meeting/index.js.map +1 -1
- package/package.json +23 -19
- package/src/meeting/index.js +108 -87
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/plugin-meetings",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Cisco EULA (https://www.cisco.com/c/en/us/products/end-user-license-agreement.html)",
|
|
6
6
|
"contributors": [
|
|
@@ -13,9 +13,13 @@
|
|
|
13
13
|
],
|
|
14
14
|
"main": "dist/index.js",
|
|
15
15
|
"devMain": "src/index.js",
|
|
16
|
-
"repository":
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/webex/webex-js-sdk.git",
|
|
19
|
+
"directory": "packages/@webex/plugin-meetings"
|
|
20
|
+
},
|
|
17
21
|
"engines": {
|
|
18
|
-
"node": ">=
|
|
22
|
+
"node": ">=16"
|
|
19
23
|
},
|
|
20
24
|
"browserify": {
|
|
21
25
|
"transform": [
|
|
@@ -24,30 +28,30 @@
|
|
|
24
28
|
]
|
|
25
29
|
},
|
|
26
30
|
"devDependencies": {
|
|
27
|
-
"@webex/plugin-meetings": "
|
|
28
|
-
"@webex/test-helper-chai": "
|
|
29
|
-
"@webex/test-helper-mocha": "
|
|
30
|
-
"@webex/test-helper-mock-webex": "
|
|
31
|
-
"@webex/test-helper-retry": "
|
|
32
|
-
"@webex/test-helper-test-users": "
|
|
31
|
+
"@webex/plugin-meetings": "3.0.0-beta.0",
|
|
32
|
+
"@webex/test-helper-chai": "3.0.0-beta.0",
|
|
33
|
+
"@webex/test-helper-mocha": "3.0.0-beta.0",
|
|
34
|
+
"@webex/test-helper-mock-webex": "3.0.0-beta.0",
|
|
35
|
+
"@webex/test-helper-retry": "3.0.0-beta.0",
|
|
36
|
+
"@webex/test-helper-test-users": "3.0.0-beta.0",
|
|
33
37
|
"chai": "^4.3.4",
|
|
34
38
|
"chai-as-promised": "^7.1.1",
|
|
35
39
|
"jsdom-global": "3.0.2",
|
|
36
40
|
"sinon": "^9.2.4"
|
|
37
41
|
},
|
|
38
42
|
"dependencies": {
|
|
39
|
-
"@webex/common": "
|
|
43
|
+
"@webex/common": "3.0.0-beta.0",
|
|
40
44
|
"@webex/internal-media-core": "^0.0.7-beta",
|
|
41
|
-
"@webex/internal-plugin-conversation": "
|
|
42
|
-
"@webex/internal-plugin-device": "
|
|
43
|
-
"@webex/internal-plugin-mercury": "
|
|
44
|
-
"@webex/internal-plugin-metrics": "
|
|
45
|
-
"@webex/internal-plugin-support": "
|
|
46
|
-
"@webex/internal-plugin-user": "
|
|
47
|
-
"@webex/plugin-people": "
|
|
48
|
-
"@webex/plugin-rooms": "
|
|
45
|
+
"@webex/internal-plugin-conversation": "3.0.0-beta.0",
|
|
46
|
+
"@webex/internal-plugin-device": "3.0.0-beta.0",
|
|
47
|
+
"@webex/internal-plugin-mercury": "3.0.0-beta.0",
|
|
48
|
+
"@webex/internal-plugin-metrics": "3.0.0-beta.0",
|
|
49
|
+
"@webex/internal-plugin-support": "3.0.0-beta.0",
|
|
50
|
+
"@webex/internal-plugin-user": "3.0.0-beta.0",
|
|
51
|
+
"@webex/plugin-people": "3.0.0-beta.0",
|
|
52
|
+
"@webex/plugin-rooms": "3.0.0-beta.0",
|
|
49
53
|
"@webex/ts-sdp": "^1.0.1",
|
|
50
|
-
"@webex/webex-core": "
|
|
54
|
+
"@webex/webex-core": "3.0.0-beta.0",
|
|
51
55
|
"bowser": "^2.11.0",
|
|
52
56
|
"btoa": "^1.2.1",
|
|
53
57
|
"dotenv": "^4.0.0",
|
package/src/meeting/index.js
CHANGED
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
_INCOMING_,
|
|
37
37
|
_JOIN_,
|
|
38
38
|
AUDIO,
|
|
39
|
+
CONNECTION_STATE,
|
|
39
40
|
CONTENT,
|
|
40
41
|
ENDED,
|
|
41
42
|
EVENT_TRIGGERS,
|
|
@@ -57,6 +58,7 @@ import {
|
|
|
57
58
|
ONLINE,
|
|
58
59
|
OFFLINE,
|
|
59
60
|
PASSWORD_STATUS,
|
|
61
|
+
PC_BAIL_TIMEOUT,
|
|
60
62
|
PSTN_STATUS,
|
|
61
63
|
QUALITY_LEVELS,
|
|
62
64
|
RECORDING_STATE,
|
|
@@ -4254,110 +4256,129 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
4254
4256
|
enableRtx: this.config.enableRtx,
|
|
4255
4257
|
enableExtmap: this.config.enableExtmap,
|
|
4256
4258
|
setStartLocalSDPGenRemoteSDPRecvDelay: this.setStartLocalSDPGenRemoteSDPRecvDelay.bind(this)
|
|
4257
|
-
}))
|
|
4258
|
-
.then((peerConnection) => this.getDevices().then((devices) => {
|
|
4259
|
-
MeetingUtil.handleDeviceLogging(devices);
|
|
4260
|
-
|
|
4261
|
-
return peerConnection;
|
|
4262
|
-
}))
|
|
4263
|
-
.then((peerConnection) => {
|
|
4264
|
-
this.handleMediaLogging(this.mediaProperties);
|
|
4265
|
-
LoggerProxy.logger.info(`${LOG_HEADER} PeerConnection Received from attachMedia `);
|
|
4266
|
-
|
|
4267
|
-
this.setRemoteStream(peerConnection);
|
|
4268
|
-
if (this.config.stats.enableStatsAnalyzer) {
|
|
4269
|
-
// TODO: ** Dont re create StatsAnalyzer on reconnect or rejoin
|
|
4270
|
-
this.networkQualityMonitor = new NetworkQualityMonitor(this.config.stats);
|
|
4271
|
-
this.statsAnalyzer = new StatsAnalyzer(this.config.stats, this.networkQualityMonitor);
|
|
4272
|
-
this.setupStatsAnalyzerEventHandlers();
|
|
4273
|
-
this.networkQualityMonitor.on(EVENT_TRIGGERS.NETWORK_QUALITY, this.sendNetworkQualityEvent.bind(this));
|
|
4274
|
-
}
|
|
4275
4259
|
})
|
|
4276
|
-
|
|
4277
|
-
|
|
4260
|
+
.then((peerConnection) => this.getDevices().then((devices) => {
|
|
4261
|
+
MeetingUtil.handleDeviceLogging(devices);
|
|
4278
4262
|
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4263
|
+
return peerConnection;
|
|
4264
|
+
}))
|
|
4265
|
+
.then((peerConnection) => {
|
|
4266
|
+
this.handleMediaLogging(this.mediaProperties);
|
|
4267
|
+
LoggerProxy.logger.info(`${LOG_HEADER} PeerConnection Received from attachMedia `);
|
|
4268
|
+
|
|
4269
|
+
this.setRemoteStream(peerConnection);
|
|
4270
|
+
if (this.config.stats.enableStatsAnalyzer) {
|
|
4271
|
+
// TODO: ** Dont re create StatsAnalyzer on reconnect or rejoin
|
|
4272
|
+
this.networkQualityMonitor = new NetworkQualityMonitor(this.config.stats);
|
|
4273
|
+
this.statsAnalyzer = new StatsAnalyzer(this.config.stats, this.networkQualityMonitor);
|
|
4274
|
+
this.setupStatsAnalyzerEventHandlers();
|
|
4275
|
+
this.networkQualityMonitor.on(EVENT_TRIGGERS.NETWORK_QUALITY, this.sendNetworkQualityEvent.bind(this));
|
|
4288
4276
|
}
|
|
4289
|
-
)
|
|
4277
|
+
})
|
|
4278
|
+
.catch((error) => {
|
|
4279
|
+
LoggerProxy.logger.error(`${LOG_HEADER} Error adding media , setting up peerconnection, `, error);
|
|
4290
4280
|
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4281
|
+
Metrics.sendBehavioralMetric(
|
|
4282
|
+
BEHAVIORAL_METRICS.ADD_MEDIA_FAILURE,
|
|
4283
|
+
{
|
|
4284
|
+
correlation_id: this.correlationId,
|
|
4285
|
+
locus_id: this.locusUrl.split('/').pop(),
|
|
4286
|
+
reason: error.message,
|
|
4287
|
+
stack: error.stack,
|
|
4288
|
+
turnDiscoverySkippedReason,
|
|
4289
|
+
turnServerUsed
|
|
4290
|
+
}
|
|
4291
|
+
);
|
|
4295
4292
|
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
if (this.
|
|
4304
|
-
clearInterval(joiningTimer);
|
|
4293
|
+
throw error;
|
|
4294
|
+
})
|
|
4295
|
+
.then(() => new Promise((resolve, reject) => {
|
|
4296
|
+
let timerCount = 0;
|
|
4297
|
+
|
|
4298
|
+
// eslint-disable-next-line func-names
|
|
4299
|
+
// eslint-disable-next-line prefer-arrow-callback
|
|
4300
|
+
if (this.type === _CALL_) {
|
|
4305
4301
|
resolve();
|
|
4306
4302
|
}
|
|
4303
|
+
const joiningTimer = setInterval(() => {
|
|
4304
|
+
timerCount += 1;
|
|
4305
|
+
if (this.meetingState === FULL_STATE.ACTIVE) {
|
|
4306
|
+
clearInterval(joiningTimer);
|
|
4307
|
+
resolve();
|
|
4308
|
+
}
|
|
4307
4309
|
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
}))
|
|
4314
|
-
.then(() =>
|
|
4315
|
-
logRequest(this.roap
|
|
4316
|
-
.sendRoapMediaRequest({
|
|
4317
|
-
sdp: this.mediaProperties.peerConnection.sdp,
|
|
4318
|
-
roapSeq: this.roapSeq,
|
|
4319
|
-
meeting: this // or can pass meeting ID
|
|
4320
|
-
}), {
|
|
4321
|
-
header: `${LOG_HEADER} Send Roap Media Request.`,
|
|
4322
|
-
success: `${LOG_HEADER} Successfully send roap media request`,
|
|
4323
|
-
failure: `${LOG_HEADER} Error joining the call on send roap media request, `
|
|
4310
|
+
if (timerCount === 4) {
|
|
4311
|
+
clearInterval(joiningTimer);
|
|
4312
|
+
reject(new Error('Meeting is still not active '));
|
|
4313
|
+
}
|
|
4314
|
+
}, 1000);
|
|
4324
4315
|
}))
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4316
|
+
.then(() =>
|
|
4317
|
+
logRequest(this.roap
|
|
4318
|
+
.sendRoapMediaRequest({
|
|
4319
|
+
sdp: this.mediaProperties.peerConnection.sdp,
|
|
4320
|
+
roapSeq: this.roapSeq,
|
|
4321
|
+
meeting: this // or can pass meeting ID
|
|
4322
|
+
}), {
|
|
4323
|
+
header: `${LOG_HEADER} Send Roap Media Request.`,
|
|
4324
|
+
success: `${LOG_HEADER} Successfully send roap media request`,
|
|
4325
|
+
failure: `${LOG_HEADER} Error joining the call on send roap media request, `
|
|
4326
|
+
}))
|
|
4327
|
+
.then(() => {
|
|
4328
|
+
const {peerConnection} = this.mediaProperties;
|
|
4333
4329
|
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
}
|
|
4330
|
+
return new Promise((resolve, reject) => {
|
|
4331
|
+
if (peerConnection.connectionState === CONNECTION_STATE.CONNECTED) {
|
|
4332
|
+
LoggerProxy.logger.info(`${LOG_HEADER} PeerConnection CONNECTED`);
|
|
4338
4333
|
|
|
4339
|
-
|
|
4340
|
-
this.floorGrantPending = true;
|
|
4341
|
-
}
|
|
4334
|
+
resolve(peerConnection);
|
|
4342
4335
|
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4336
|
+
return;
|
|
4337
|
+
}
|
|
4338
|
+
// Check if Peer Connection is STABLE (connected)
|
|
4339
|
+
const stabilityTimeout = setTimeout(() => {
|
|
4340
|
+
if (peerConnection.connectionState !== CONNECTION_STATE.CONNECTED) {
|
|
4341
|
+
// TODO: Fix this after the error code pr goes in
|
|
4342
|
+
reject(createMeetingsError(30202, 'Meeting connection failed'));
|
|
4343
|
+
}
|
|
4344
|
+
else {
|
|
4345
|
+
LoggerProxy.logger.info(`${LOG_HEADER} PeerConnection CONNECTED`);
|
|
4346
|
+
resolve(peerConnection);
|
|
4347
|
+
}
|
|
4348
|
+
}, PC_BAIL_TIMEOUT);
|
|
4349
|
+
|
|
4350
|
+
this.once(EVENT_TRIGGERS.MEDIA_READY, () => {
|
|
4351
|
+
LoggerProxy.logger.info(`${LOG_HEADER} PeerConnection CONNECTED, clearing stability timer.`);
|
|
4352
|
+
clearTimeout(stabilityTimeout);
|
|
4353
|
+
resolve(peerConnection);
|
|
4354
|
+
});
|
|
4355
|
+
});
|
|
4356
|
+
})
|
|
4357
|
+
.then(() => {
|
|
4358
|
+
if (mediaSettings && mediaSettings.sendShare && localShare) {
|
|
4359
|
+
if (this.state === MEETING_STATE.STATES.JOINED) {
|
|
4360
|
+
return this.share();
|
|
4361
|
+
}
|
|
4362
|
+
|
|
4363
|
+
// When the self state changes to JOINED then request the floor
|
|
4364
|
+
this.floorGrantPending = true;
|
|
4353
4365
|
}
|
|
4354
|
-
|
|
4355
|
-
|
|
4366
|
+
|
|
4367
|
+
Metrics.sendBehavioralMetric(
|
|
4368
|
+
BEHAVIORAL_METRICS.ADD_MEDIA_SUCCESS,
|
|
4369
|
+
{
|
|
4370
|
+
correlation_id: this.correlationId,
|
|
4371
|
+
locus_id: this.locusUrl.split('/').pop()
|
|
4372
|
+
}
|
|
4373
|
+
);
|
|
4374
|
+
|
|
4375
|
+
return Promise.resolve();
|
|
4376
|
+
}))
|
|
4356
4377
|
.catch((error) => {
|
|
4357
4378
|
// Clean up stats analyzer, peer connection, and turn off listeners
|
|
4358
4379
|
const stopStatsAnalyzer = (this.statsAnalyzer) ? this.statsAnalyzer.stopAnalyzer() : Promise.resolve();
|
|
4359
4380
|
|
|
4360
|
-
|
|
4381
|
+
stopStatsAnalyzer
|
|
4361
4382
|
.then(() => {
|
|
4362
4383
|
this.statsAnalyzer = null;
|
|
4363
4384
|
|