@webex/plugin-meetings 3.0.0-beta.35 → 3.0.0-beta.37
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/edit-lock-error.js +52 -0
- package/dist/breakouts/edit-lock-error.js.map +1 -0
- package/dist/breakouts/index.js +86 -2
- package/dist/breakouts/index.js.map +1 -1
- package/dist/constants.js +12 -1
- package/dist/constants.js.map +1 -1
- package/dist/media/index.js +4 -18
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +3 -3
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/index.js +194 -306
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.js +7 -2
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/util.js +2 -2
- package/dist/meeting/util.js.map +1 -1
- package/dist/metrics/constants.js +0 -4
- package/dist/metrics/constants.js.map +1 -1
- package/dist/reconnection-manager/index.js +1 -2
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/statsAnalyzer/index.js +8 -4
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/types/breakouts/edit-lock-error.d.ts +15 -0
- package/dist/types/constants.d.ts +11 -0
- package/dist/types/media/properties.d.ts +7 -6
- package/dist/types/meeting/index.d.ts +11 -36
- package/dist/types/metrics/constants.d.ts +0 -4
- package/package.json +19 -19
- package/src/breakouts/README.md +8 -2
- package/src/breakouts/edit-lock-error.ts +25 -0
- package/src/breakouts/index.ts +73 -0
- package/src/constants.ts +11 -0
- package/src/media/index.ts +14 -24
- package/src/media/properties.ts +16 -10
- package/src/meeting/index.ts +122 -204
- package/src/meeting/muteState.ts +5 -5
- package/src/meeting/util.ts +5 -4
- package/src/metrics/constants.ts +0 -4
- package/src/reconnection-manager/index.ts +1 -1
- package/src/statsAnalyzer/index.ts +4 -4
- package/test/integration/spec/converged-space-meetings.js +3 -3
- package/test/integration/spec/journey.js +3 -3
- package/test/unit/spec/breakouts/edit-lock-error.ts +30 -0
- package/test/unit/spec/breakouts/index.ts +92 -1
- package/test/unit/spec/media/index.ts +8 -6
- package/test/unit/spec/meeting/index.js +87 -114
- package/test/unit/spec/meeting/muteState.js +21 -22
- package/test/unit/spec/meeting/utils.js +3 -1
- package/test/utils/testUtils.js +30 -25
- package/dist/meeting/effectsState.js +0 -262
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/types/meeting/effectsState.d.ts +0 -42
- package/src/meeting/effectsState.ts +0 -211
- package/test/unit/spec/meeting/effectsState.js +0 -285
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/plugin-meetings",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.37",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Cisco EULA (https://www.cisco.com/c/en/us/products/end-user-license-agreement.html)",
|
|
6
6
|
"contributors": [
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"build": "yarn run -T tsc --declaration true --declarationDir ./dist/types"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@webex/plugin-meetings": "3.0.0-beta.
|
|
36
|
-
"@webex/test-helper-chai": "3.0.0-beta.
|
|
37
|
-
"@webex/test-helper-mocha": "3.0.0-beta.
|
|
38
|
-
"@webex/test-helper-mock-webex": "3.0.0-beta.
|
|
39
|
-
"@webex/test-helper-retry": "3.0.0-beta.
|
|
40
|
-
"@webex/test-helper-test-users": "3.0.0-beta.
|
|
35
|
+
"@webex/plugin-meetings": "3.0.0-beta.37",
|
|
36
|
+
"@webex/test-helper-chai": "3.0.0-beta.37",
|
|
37
|
+
"@webex/test-helper-mocha": "3.0.0-beta.37",
|
|
38
|
+
"@webex/test-helper-mock-webex": "3.0.0-beta.37",
|
|
39
|
+
"@webex/test-helper-retry": "3.0.0-beta.37",
|
|
40
|
+
"@webex/test-helper-test-users": "3.0.0-beta.37",
|
|
41
41
|
"chai": "^4.3.4",
|
|
42
42
|
"chai-as-promised": "^7.1.1",
|
|
43
43
|
"jsdom-global": "3.0.2",
|
|
@@ -46,18 +46,18 @@
|
|
|
46
46
|
"typescript": "^4.7.4"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@webex/common": "3.0.0-beta.
|
|
50
|
-
"@webex/internal-media-core": "1.35.
|
|
51
|
-
"@webex/internal-plugin-conversation": "3.0.0-beta.
|
|
52
|
-
"@webex/internal-plugin-device": "3.0.0-beta.
|
|
53
|
-
"@webex/internal-plugin-llm": "3.0.0-beta.
|
|
54
|
-
"@webex/internal-plugin-mercury": "3.0.0-beta.
|
|
55
|
-
"@webex/internal-plugin-metrics": "3.0.0-beta.
|
|
56
|
-
"@webex/internal-plugin-support": "3.0.0-beta.
|
|
57
|
-
"@webex/internal-plugin-user": "3.0.0-beta.
|
|
58
|
-
"@webex/plugin-people": "3.0.0-beta.
|
|
59
|
-
"@webex/plugin-rooms": "3.0.0-beta.
|
|
60
|
-
"@webex/webex-core": "3.0.0-beta.
|
|
49
|
+
"@webex/common": "3.0.0-beta.37",
|
|
50
|
+
"@webex/internal-media-core": "1.35.1",
|
|
51
|
+
"@webex/internal-plugin-conversation": "3.0.0-beta.37",
|
|
52
|
+
"@webex/internal-plugin-device": "3.0.0-beta.37",
|
|
53
|
+
"@webex/internal-plugin-llm": "3.0.0-beta.37",
|
|
54
|
+
"@webex/internal-plugin-mercury": "3.0.0-beta.37",
|
|
55
|
+
"@webex/internal-plugin-metrics": "3.0.0-beta.37",
|
|
56
|
+
"@webex/internal-plugin-support": "3.0.0-beta.37",
|
|
57
|
+
"@webex/internal-plugin-user": "3.0.0-beta.37",
|
|
58
|
+
"@webex/plugin-people": "3.0.0-beta.37",
|
|
59
|
+
"@webex/plugin-rooms": "3.0.0-beta.37",
|
|
60
|
+
"@webex/webex-core": "3.0.0-beta.37",
|
|
61
61
|
"ampersand-collection": "^2.0.2",
|
|
62
62
|
"bowser": "^2.11.0",
|
|
63
63
|
"btoa": "^1.2.1",
|
package/src/breakouts/README.md
CHANGED
|
@@ -119,8 +119,14 @@ breakout.remove(participant)
|
|
|
119
119
|
// This can only be done when breakouts are inactive
|
|
120
120
|
breakout.delete()
|
|
121
121
|
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
/*
|
|
123
|
+
Create breakout sessions, Type is array
|
|
124
|
+
Format: [{'name':'session1', "anyoneCanJoin" : true}]
|
|
125
|
+
*/
|
|
126
|
+
breakouts.create(sessions)
|
|
127
|
+
|
|
128
|
+
// Delete all breakout sessions
|
|
129
|
+
breakouts.clearSessions()
|
|
124
130
|
|
|
125
131
|
// Rename an existing breakout session
|
|
126
132
|
breakout.rename(newSessionName)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {ERROR_DICTIONARY} from '../constants';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Extended Error object to signify breakout related errors
|
|
5
|
+
*/
|
|
6
|
+
export default class BreakoutEditLockedError extends Error {
|
|
7
|
+
code: any;
|
|
8
|
+
error: any;
|
|
9
|
+
sdkMessage: any;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @constructor
|
|
14
|
+
* @param {String} [message]
|
|
15
|
+
* @param {Object} [error]
|
|
16
|
+
*/
|
|
17
|
+
constructor(message: string = ERROR_DICTIONARY.BREAKOUT_EDIT.MESSAGE, error: any = null) {
|
|
18
|
+
super(message);
|
|
19
|
+
this.name = ERROR_DICTIONARY.BREAKOUT_EDIT.NAME;
|
|
20
|
+
this.sdkMessage = ERROR_DICTIONARY.BREAKOUT_EDIT.MESSAGE;
|
|
21
|
+
this.error = error;
|
|
22
|
+
this.stack = error ? error.stack : new Error().stack;
|
|
23
|
+
this.code = ERROR_DICTIONARY.BREAKOUT_EDIT.CODE;
|
|
24
|
+
}
|
|
25
|
+
}
|
package/src/breakouts/index.ts
CHANGED
|
@@ -10,6 +10,7 @@ import {BREAKOUTS, HTTP_VERBS, MEETINGS} from '../constants';
|
|
|
10
10
|
import Breakout from './breakout';
|
|
11
11
|
import BreakoutCollection from './collection';
|
|
12
12
|
import BreakoutRequest from './request';
|
|
13
|
+
import BreakoutEditLockedError from './edit-lock-error';
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* @class Breakouts
|
|
@@ -34,6 +35,7 @@ const Breakouts = WebexPlugin.extend({
|
|
|
34
35
|
url: 'string', // appears from the moment you enable breakouts
|
|
35
36
|
locusUrl: 'string', // the current locus url
|
|
36
37
|
breakoutServiceUrl: 'string', // the current breakout resouce url
|
|
38
|
+
groups: 'array', // appears when create breakouts
|
|
37
39
|
},
|
|
38
40
|
|
|
39
41
|
children: {
|
|
@@ -348,6 +350,77 @@ const Breakouts = WebexPlugin.extend({
|
|
|
348
350
|
},
|
|
349
351
|
});
|
|
350
352
|
},
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Create new breakout sessions
|
|
356
|
+
* @param {object} sessions -- breakout session group
|
|
357
|
+
* @returns {Promise}
|
|
358
|
+
*/
|
|
359
|
+
async create(sessions) {
|
|
360
|
+
// @ts-ignore
|
|
361
|
+
const breakInfo = await this.webex
|
|
362
|
+
.request({
|
|
363
|
+
method: HTTP_VERBS.PUT,
|
|
364
|
+
uri: this.url,
|
|
365
|
+
body: {
|
|
366
|
+
groups: [
|
|
367
|
+
{
|
|
368
|
+
sessions,
|
|
369
|
+
},
|
|
370
|
+
],
|
|
371
|
+
},
|
|
372
|
+
})
|
|
373
|
+
.catch((error) => {
|
|
374
|
+
if (error.body && error.body.errorCode === BREAKOUTS.ERROR_CODE.EDIT_LOCK_TOKEN_MISMATCH) {
|
|
375
|
+
LoggerProxy.logger.info(`Breakouts#create --> Edit lock token mismatch`);
|
|
376
|
+
|
|
377
|
+
return Promise.reject(new BreakoutEditLockedError('Edit lock token mismatch', error));
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
return Promise.reject(error);
|
|
381
|
+
});
|
|
382
|
+
|
|
383
|
+
if (breakInfo.body && breakInfo.body.groups && breakInfo.body.groups) {
|
|
384
|
+
this.set('groups', breakInfo.body.groups);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
return Promise.resolve(breakInfo);
|
|
388
|
+
},
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Delete all breakout sessions
|
|
392
|
+
* @returns {Promise}
|
|
393
|
+
*/
|
|
394
|
+
async clearSessions() {
|
|
395
|
+
// @ts-ignore
|
|
396
|
+
const breakInfo = await this.webex
|
|
397
|
+
.request({
|
|
398
|
+
method: HTTP_VERBS.PUT,
|
|
399
|
+
uri: this.url,
|
|
400
|
+
body: {
|
|
401
|
+
groups: [
|
|
402
|
+
{
|
|
403
|
+
action: BREAKOUTS.ACTION_TYPES.DELETE,
|
|
404
|
+
},
|
|
405
|
+
],
|
|
406
|
+
},
|
|
407
|
+
})
|
|
408
|
+
.catch((error) => {
|
|
409
|
+
if (error.body && error.body.errorCode === BREAKOUTS.ERROR_CODE.EDIT_LOCK_TOKEN_MISMATCH) {
|
|
410
|
+
LoggerProxy.logger.info(`Breakouts#clearSessions --> Edit lock token mismatch`);
|
|
411
|
+
|
|
412
|
+
return Promise.reject(new BreakoutEditLockedError('Edit lock token mismatch', error));
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
return Promise.reject(error);
|
|
416
|
+
});
|
|
417
|
+
|
|
418
|
+
if (breakInfo.body && breakInfo.body.groups && breakInfo.body.groups) {
|
|
419
|
+
this.set('groups', breakInfo.body.groups);
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
return Promise.resolve(breakInfo);
|
|
423
|
+
},
|
|
351
424
|
});
|
|
352
425
|
|
|
353
426
|
export default Breakouts;
|
package/src/constants.ts
CHANGED
|
@@ -452,6 +452,11 @@ export const ERROR_DICTIONARY = {
|
|
|
452
452
|
MESSAGE: 'Captcha is required.',
|
|
453
453
|
CODE: 8,
|
|
454
454
|
},
|
|
455
|
+
BREAKOUT_EDIT: {
|
|
456
|
+
NAME: 'BreakoutEditLockedError',
|
|
457
|
+
MESSAGE: 'Edit lock token mismatch',
|
|
458
|
+
CODE: 9,
|
|
459
|
+
},
|
|
455
460
|
};
|
|
456
461
|
|
|
457
462
|
export const FLOOR_ACTION = {
|
|
@@ -538,6 +543,12 @@ export const BREAKOUTS = {
|
|
|
538
543
|
REQUESTED: 'requested',
|
|
539
544
|
},
|
|
540
545
|
BREAKOUTS_SUPPORTED: 'BREAKOUTS_SUPPORTED',
|
|
546
|
+
ACTION_TYPES: {
|
|
547
|
+
DELETE: 'DELETE',
|
|
548
|
+
},
|
|
549
|
+
ERROR_CODE: {
|
|
550
|
+
EDIT_LOCK_TOKEN_MISMATCH: 201409024,
|
|
551
|
+
},
|
|
541
552
|
};
|
|
542
553
|
|
|
543
554
|
export const LOCUSINFO = {
|
package/src/media/index.ts
CHANGED
|
@@ -3,7 +3,13 @@
|
|
|
3
3
|
*/
|
|
4
4
|
/* globals navigator */
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
LocalCameraTrack,
|
|
8
|
+
LocalDisplayTrack,
|
|
9
|
+
LocalMicrophoneTrack,
|
|
10
|
+
RoapMediaConnection,
|
|
11
|
+
MultistreamRoapMediaConnection,
|
|
12
|
+
} from '@webex/internal-media-core';
|
|
7
13
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
8
14
|
import {AUDIO_INPUT, VIDEO_INPUT, MEDIA_TRACK_CONSTRAINT} from '../constants';
|
|
9
15
|
import Config from '../config';
|
|
@@ -43,22 +49,6 @@ const {isBrowser} = BrowserDetection();
|
|
|
43
49
|
*/
|
|
44
50
|
const Media: any = {};
|
|
45
51
|
|
|
46
|
-
/**
|
|
47
|
-
* @param {boolean} enabled
|
|
48
|
-
* @param {MediaStreamTrack} track
|
|
49
|
-
* @returns {Boolean}
|
|
50
|
-
* @public
|
|
51
|
-
*/
|
|
52
|
-
Media.setLocalTrack = (enabled: boolean, track: MediaStreamTrack) => {
|
|
53
|
-
if (track) {
|
|
54
|
-
track.enabled = enabled;
|
|
55
|
-
|
|
56
|
-
return true;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return false;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
52
|
/**
|
|
63
53
|
* format the media array for send
|
|
64
54
|
* @param {String} mediaId
|
|
@@ -121,7 +111,7 @@ Media.getLocalMedia = (options: any, config: object) => {
|
|
|
121
111
|
* @param {boolean} [options.enableRtx] applicable only to non-multistream connections
|
|
122
112
|
* @param {boolean} [options.enableExtmap] applicable only to non-multistream connections
|
|
123
113
|
* @param {Object} [options.turnServerInfo]
|
|
124
|
-
* @returns {RoapMediaConnection}
|
|
114
|
+
* @returns {RoapMediaConnection | MultistreamRoapMediaConnection}
|
|
125
115
|
*/
|
|
126
116
|
Media.createMediaConnection = (
|
|
127
117
|
isMultistream: boolean,
|
|
@@ -133,9 +123,9 @@ Media.createMediaConnection = (
|
|
|
133
123
|
receiveVideo: boolean;
|
|
134
124
|
receiveShare: boolean;
|
|
135
125
|
};
|
|
136
|
-
audioTrack?:
|
|
137
|
-
videoTrack?:
|
|
138
|
-
shareTrack?:
|
|
126
|
+
audioTrack?: LocalMicrophoneTrack;
|
|
127
|
+
videoTrack?: LocalCameraTrack;
|
|
128
|
+
shareTrack?: LocalDisplayTrack;
|
|
139
129
|
};
|
|
140
130
|
remoteQualityLevel?: 'LOW' | 'MEDIUM' | 'HIGH';
|
|
141
131
|
enableRtx?: boolean;
|
|
@@ -194,9 +184,9 @@ Media.createMediaConnection = (
|
|
|
194
184
|
},
|
|
195
185
|
{
|
|
196
186
|
send: {
|
|
197
|
-
audio: audioTrack,
|
|
198
|
-
video: videoTrack,
|
|
199
|
-
screenShareVideo: shareTrack,
|
|
187
|
+
audio: audioTrack?.underlyingTrack,
|
|
188
|
+
video: videoTrack?.underlyingTrack,
|
|
189
|
+
screenShareVideo: shareTrack?.underlyingTrack,
|
|
200
190
|
},
|
|
201
191
|
receive: {
|
|
202
192
|
audio: mediaDirection.receiveAudio,
|
package/src/media/properties.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
ConnectionState,
|
|
3
|
+
Event,
|
|
4
|
+
LocalCameraTrack,
|
|
5
|
+
LocalMicrophoneTrack,
|
|
6
|
+
LocalDisplayTrack,
|
|
7
|
+
} from '@webex/internal-media-core';
|
|
2
8
|
|
|
3
9
|
import {MEETINGS, PC_BAIL_TIMEOUT, QUALITY_LEVELS} from '../constants';
|
|
4
10
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
@@ -7,7 +13,7 @@ import LoggerProxy from '../common/logs/logger-proxy';
|
|
|
7
13
|
* @class MediaProperties
|
|
8
14
|
*/
|
|
9
15
|
export default class MediaProperties {
|
|
10
|
-
audioTrack:
|
|
16
|
+
audioTrack: LocalMicrophoneTrack | null;
|
|
11
17
|
localQualityLevel: any;
|
|
12
18
|
mediaDirection: any;
|
|
13
19
|
mediaSettings: any;
|
|
@@ -16,9 +22,9 @@ export default class MediaProperties {
|
|
|
16
22
|
remoteQualityLevel: any;
|
|
17
23
|
remoteShare: any;
|
|
18
24
|
remoteVideoTrack: any;
|
|
19
|
-
shareTrack:
|
|
25
|
+
shareTrack: LocalDisplayTrack | null;
|
|
20
26
|
videoDeviceId: any;
|
|
21
|
-
videoTrack:
|
|
27
|
+
videoTrack: LocalCameraTrack | null;
|
|
22
28
|
namespace = MEETINGS;
|
|
23
29
|
|
|
24
30
|
/**
|
|
@@ -28,9 +34,9 @@ export default class MediaProperties {
|
|
|
28
34
|
constructor(options: any = {}) {
|
|
29
35
|
this.webrtcMediaConnection = null;
|
|
30
36
|
this.mediaDirection = options.mediaDirection;
|
|
31
|
-
this.videoTrack = options.videoTrack;
|
|
32
|
-
this.audioTrack = options.audioTrack;
|
|
33
|
-
this.shareTrack = options.shareTrack;
|
|
37
|
+
this.videoTrack = options.videoTrack || null;
|
|
38
|
+
this.audioTrack = options.audioTrack || null;
|
|
39
|
+
this.shareTrack = options.shareTrack || null;
|
|
34
40
|
this.remoteShare = options.remoteShare;
|
|
35
41
|
this.remoteAudioTrack = options.remoteAudioTrack;
|
|
36
42
|
this.remoteVideoTrack = options.remoteVideoTrack;
|
|
@@ -60,11 +66,11 @@ export default class MediaProperties {
|
|
|
60
66
|
this.webrtcMediaConnection = mediaPeerConnection;
|
|
61
67
|
}
|
|
62
68
|
|
|
63
|
-
setLocalVideoTrack(videoTrack) {
|
|
69
|
+
setLocalVideoTrack(videoTrack: LocalCameraTrack | null) {
|
|
64
70
|
this.videoTrack = videoTrack;
|
|
65
71
|
}
|
|
66
72
|
|
|
67
|
-
setLocalAudioTrack(audioTrack) {
|
|
73
|
+
setLocalAudioTrack(audioTrack: LocalMicrophoneTrack | null) {
|
|
68
74
|
this.audioTrack = audioTrack;
|
|
69
75
|
}
|
|
70
76
|
|
|
@@ -72,7 +78,7 @@ export default class MediaProperties {
|
|
|
72
78
|
this.localQualityLevel = localQualityLevel;
|
|
73
79
|
}
|
|
74
80
|
|
|
75
|
-
setLocalShareTrack(shareTrack) {
|
|
81
|
+
setLocalShareTrack(shareTrack: LocalDisplayTrack | null) {
|
|
76
82
|
this.shareTrack = shareTrack;
|
|
77
83
|
}
|
|
78
84
|
|