@webex/plugin-meetings 3.8.0-next.81 → 3.8.0-next.83

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.
@@ -12,20 +12,6 @@ export type ServerRoleShape = {
12
12
  type: ServerRoles;
13
13
  hasRole: boolean;
14
14
  };
15
- export type ParticipantWithRoles = {
16
- controls: {
17
- role: {
18
- roles: Array<ServerRoleShape>;
19
- };
20
- };
21
- };
22
- export type ParticipantWithBrb = {
23
- controls: {
24
- brb?: {
25
- enabled: boolean;
26
- };
27
- };
28
- };
29
15
  export declare enum MediaStatus {
30
16
  RECVONLY = "RECVONLY",
31
17
  SENDONLY = "SENDONLY",
@@ -37,3 +23,76 @@ export interface IMediaStatus {
37
23
  audio: MediaStatus;
38
24
  video: MediaStatus;
39
25
  }
26
+ export type Csi = number;
27
+ export type Direction = 'inactive' | 'sendrecv' | 'sendonly' | 'recvonly';
28
+ export type ParticipantUrl = string;
29
+ export interface MediaSession {
30
+ csi: Csi;
31
+ direction: Direction;
32
+ mediaContent: 'main' | 'slides';
33
+ mediaType: 'audio' | 'video';
34
+ state: string;
35
+ }
36
+ export interface Intent {
37
+ associatedWith: ParticipantUrl;
38
+ id: string;
39
+ type: string;
40
+ }
41
+ export interface ParticipantDevice {
42
+ correlationId: string;
43
+ csis: Csi[];
44
+ deviceType: string;
45
+ intent?: Intent;
46
+ intents: Array<Intent | null>;
47
+ isVideoCallback: boolean;
48
+ mediaSessions: Array<MediaSession>;
49
+ mediaSessionsExternal: boolean;
50
+ state: string;
51
+ }
52
+ export interface ParticipantPerson {
53
+ id: string;
54
+ isExternal: boolean;
55
+ name: string;
56
+ orgId: string;
57
+ }
58
+ export interface ParticipantMediaStatus {
59
+ audioStatus: MediaStatus;
60
+ videoStatus: MediaStatus;
61
+ audioSlidesStatus?: MediaStatus;
62
+ videoSlidesStatus?: MediaStatus;
63
+ csis: Csi[];
64
+ }
65
+ export interface ParticipantControls {
66
+ role: {
67
+ roles: Array<ServerRoleShape>;
68
+ };
69
+ brb?: {
70
+ enabled: boolean;
71
+ };
72
+ hand: {
73
+ raised: boolean;
74
+ };
75
+ localRecord: {
76
+ recording: boolean;
77
+ };
78
+ }
79
+ export interface Participant {
80
+ canBeController: boolean;
81
+ controls: ParticipantControls;
82
+ deviceUrl: string;
83
+ devices: Array<ParticipantDevice>;
84
+ guest: boolean;
85
+ id: string;
86
+ identity: string;
87
+ identityTrustLevel: string;
88
+ isCreator: boolean;
89
+ moderator: boolean;
90
+ moderatorAssignmentNotAllowed: boolean;
91
+ presenterAssignmentNotAllowed: boolean;
92
+ person: ParticipantPerson;
93
+ resourceGuest: boolean;
94
+ state: string;
95
+ status: ParticipantMediaStatus;
96
+ type: string;
97
+ url: ParticipantUrl;
98
+ }
@@ -1,4 +1,4 @@
1
- import { IExternalRoles, ParticipantWithRoles, ServerRoles, ServerRoleShape, IMediaStatus, ParticipantWithBrb } from './types';
1
+ import { IExternalRoles, ServerRoles, ServerRoleShape, IMediaStatus, Participant, ParticipantUrl } from './types';
2
2
  declare const MemberUtil: {
3
3
  /**
4
4
  * @param {Object} participant - The locus participant object.
@@ -9,58 +9,58 @@ declare const MemberUtil: {
9
9
  * @param {Object} participant - The locus participant object.
10
10
  * @returns {[ServerRoleShape]}
11
11
  */
12
- getControlsRoles: (participant: ParticipantWithRoles) => Array<ServerRoleShape>;
12
+ getControlsRoles: (participant: Participant) => Array<ServerRoleShape>;
13
13
  /**
14
14
  * Checks if the participant has the brb status enabled.
15
15
  *
16
- * @param {ParticipantWithBrb} participant - The locus participant object.
16
+ * @param {Participant} participant - The locus participant object.
17
17
  * @returns {boolean} - True if the participant has brb enabled, false otherwise.
18
18
  */
19
- isBrb: (participant: ParticipantWithBrb) => boolean;
19
+ isBrb: (participant: Participant) => boolean;
20
20
  /**
21
21
  * @param {Object} participant - The locus participant object.
22
22
  * @param {ServerRoles} controlRole the search role
23
23
  * @returns {Boolean}
24
24
  */
25
- hasRole: (participant: any, controlRole: ServerRoles) => boolean;
25
+ hasRole: (participant: Participant, controlRole: ServerRoles) => boolean;
26
26
  /**
27
27
  * @param {Object} participant - The locus participant object.
28
28
  * @returns {Boolean}
29
29
  */
30
- hasCohost: (participant: ParticipantWithRoles) => boolean;
30
+ hasCohost: (participant: Participant) => boolean;
31
31
  /**
32
32
  * @param {Object} participant - The locus participant object.
33
33
  * @returns {Boolean}
34
34
  */
35
- hasModerator: (participant: ParticipantWithRoles) => boolean;
35
+ hasModerator: (participant: Participant) => boolean;
36
36
  /**
37
37
  * @param {Object} participant - The locus participant object.
38
38
  * @returns {Boolean}
39
39
  */
40
- hasPresenter: (participant: ParticipantWithRoles) => boolean;
40
+ hasPresenter: (participant: Participant) => boolean;
41
41
  /**
42
42
  * @param {Object} participant - The locus participant object.
43
43
  * @returns {IExternalRoles}
44
44
  */
45
- extractControlRoles: (participant: ParticipantWithRoles) => IExternalRoles;
45
+ extractControlRoles: (participant: Participant) => IExternalRoles;
46
46
  /**
47
47
  * @param {Object} participant - The locus participant object.
48
48
  * @returns {Boolean}
49
49
  */
50
- isUser: (participant: any) => boolean;
51
- isModerator: (participant: any) => any;
50
+ isUser: (participant: Participant) => boolean;
51
+ isModerator: (participant: Participant) => boolean;
52
52
  /**
53
53
  * @param {Object} participant - The locus participant object.
54
54
  * @returns {Boolean}
55
55
  */
56
- isGuest: (participant: any) => any;
56
+ isGuest: (participant: Participant) => boolean;
57
57
  /**
58
58
  * @param {Object} participant - The locus participant object.
59
59
  * @returns {Boolean}
60
60
  */
61
- isDevice: (participant: any) => boolean;
62
- isModeratorAssignmentProhibited: (participant: any) => any;
63
- isPresenterAssignmentProhibited: (participant: any) => any;
61
+ isDevice: (participant: Participant) => boolean;
62
+ isModeratorAssignmentProhibited: (participant: Participant) => boolean;
63
+ isPresenterAssignmentProhibited: (participant: Participant) => boolean;
64
64
  /**
65
65
  * checks to see if the participant id is the same as the passed id
66
66
  * there are multiple ids that can be used
@@ -68,37 +68,29 @@ declare const MemberUtil: {
68
68
  * @param {String} id
69
69
  * @returns {Boolean}
70
70
  */
71
- isSame: (participant: any, id: string) => boolean;
72
- /**
73
- * checks to see if the participant id is the same as the passed id for associated devices
74
- * there are multiple ids that can be used
75
- * @param {Object} participant - The locus participant object.
76
- * @param {String} id
77
- * @returns {Boolean}
78
- */
79
- isAssociatedSame: (participant: any, id: string) => any;
71
+ isSame: (participant: Participant, id: string) => boolean;
80
72
  /**
81
73
  * @param {Object} participant - The locus participant object.
82
74
  * @param {Boolean} isGuest
83
75
  * @param {String} status
84
76
  * @returns {Boolean}
85
77
  */
86
- isNotAdmitted: (participant: any, isGuest: boolean, status: string) => boolean;
78
+ isNotAdmitted: (participant: Participant, isGuest: boolean, status: string) => boolean;
87
79
  /**
88
80
  * @param {Object} participant - The locus participant object.
89
81
  * @returns {Boolean}
90
82
  */
91
- isAudioMuted: (participant: any) => any;
83
+ isAudioMuted: (participant: Participant) => any;
92
84
  /**
93
85
  * @param {Object} participant - The locus participant object.
94
86
  * @returns {Boolean}
95
87
  */
96
- isVideoMuted: (participant: any) => boolean;
88
+ isVideoMuted: (participant: Participant) => boolean;
97
89
  /**
98
90
  * @param {Object} participant - The locus participant object.
99
91
  * @returns {Boolean}
100
92
  */
101
- isHandRaised: (participant: any) => any;
93
+ isHandRaised: (participant: Participant) => boolean;
102
94
  /**
103
95
  * @param {Object} participant - The locus participant object.
104
96
  * @returns {Boolean}
@@ -121,7 +113,7 @@ declare const MemberUtil: {
121
113
  * @param {String} controlsAccessor
122
114
  * @returns {Boolean | undefined}
123
115
  */
124
- isMuted: (participant: any, statusAccessor: string, controlsAccessor: string) => any;
116
+ isMuted: (participant: Participant, statusAccessor: string, controlsAccessor: string) => any;
125
117
  /**
126
118
  * utility method for getting the recording member for later comparison
127
119
  * @param {Object} controls
@@ -132,29 +124,34 @@ declare const MemberUtil: {
132
124
  * @param {Object} participant - The locus participant object.
133
125
  * @returns {Boolean}
134
126
  */
135
- isRecording: (participant: any) => any;
127
+ isRecording: (participant: Participant) => boolean;
136
128
  isRemovable: (isSelf: any, isGuest: any, isInMeeting: any, type: any) => boolean;
137
129
  isMutable: (isSelf: any, isDevice: any, isInMeeting: any, isMuted: any, type: any) => boolean;
138
130
  /**
139
131
  * @param {Object} participant - The locus participant object.
140
132
  * @returns {String}
141
133
  */
142
- extractStatus: (participant: any) => "IN_LOBBY" | "IN_MEETING" | "NOT_IN_MEETING";
134
+ extractStatus: (participant: Participant) => "IN_LOBBY" | "IN_MEETING" | "NOT_IN_MEETING";
143
135
  /**
144
136
  * @param {Object} participant - The locus participant object.
145
137
  * @returns {String}
146
138
  */
147
- extractId: (participant: any) => any;
139
+ extractId: (participant: Participant) => string;
148
140
  /**
149
141
  * extracts the media status from nested participant object
150
142
  * @param {Object} participant - The locus participant object.
151
143
  * @returns {Object}
152
144
  */
153
- extractMediaStatus: (participant: any) => IMediaStatus;
145
+ extractMediaStatus: (participant: Participant) => IMediaStatus;
146
+ /**
147
+ * @param {Object} participant - The locus participant object.
148
+ * @returns {String}
149
+ */
150
+ extractName: (participant: Participant) => string;
154
151
  /**
155
152
  * @param {Object} participant - The locus participant object.
156
153
  * @returns {String}
157
154
  */
158
- extractName: (participant: any) => any;
155
+ extractPairedWithParticipantUrl: (participant: Participant) => ParticipantUrl | undefined;
159
156
  };
160
157
  export default MemberUtil;
@@ -1,26 +1,27 @@
1
+ import Member from '../member';
1
2
  /**
2
3
  * @class MembersCollection
3
4
  */
4
5
  export default class MembersCollection {
5
- members: any;
6
+ members: Record<string, Member>;
6
7
  namespace: string;
7
8
  /**
8
9
  * @param {Object} locus
9
10
  * @memberof Members
10
11
  */
11
12
  constructor();
12
- set(id: any, member: any): void;
13
- setAll(members: any): void;
13
+ set(id: string, member: Member): void;
14
+ setAll(members: Record<string, Member>): void;
14
15
  /**
15
16
  * @param {String} id
16
17
  * @returns {Member}
17
18
  */
18
- get(id: string): any;
19
+ get(id: string): Member;
19
20
  /**
20
21
  * @returns {Object} returns an object map of Member instances
21
22
  * @memberof MembersCollection
22
23
  */
23
- getAll(): any;
24
+ getAll(): Record<string, Member>;
24
25
  /**
25
26
  * @returns {void}
26
27
  * reset members
@@ -1,45 +1,9 @@
1
1
  import { StatelessWebexPlugin } from '@webex/webex-core';
2
+ import Member from '../member';
3
+ import MembersCollection from './collection';
2
4
  import { ReceiveSlotManager } from '../multistream/receiveSlotManager';
3
5
  import { MediaRequestManager } from '../multistream/mediaRequestManager';
4
6
  import { ServerRoleShape } from './types';
5
- /**
6
- * Members Update Event
7
- * Emitted when something in the roster list needs to be updated
8
- * @event members:update
9
- * @instance
10
- * @property {Object} delta the changes to the members list
11
- * @property {Array} delta.updated array only the updates, includes removals, as they will have updated status and member properties
12
- * @property {Array} delta.added array added members to the meeting
13
- * @property {Array} full array the full members collection
14
- * @memberof Members
15
- */
16
- /**
17
- * Members Content Update Event
18
- * Emitted when who is sharing changes
19
- * @event members:content:update
20
- * @instance
21
- * @property {String} activeContentSharingId
22
- * @property {String} endedContentSharingId
23
- * @memberof Members
24
- */
25
- /**
26
- * Members Host Update Event
27
- * Emitted when who is the host changes
28
- * @event members:host:update
29
- * @instance
30
- * @property {String} activeHostId
31
- * @property {String} endedHostId
32
- * @memberof Members
33
- */
34
- /**
35
- * Members Self Update Event
36
- * Emitted when who is the self changes
37
- * @event members:self:update
38
- * @instance
39
- * @property {String} activeSelfId
40
- * @property {String} endedSelfId
41
- * @memberof Members
42
- */
43
7
  /**
44
8
  * @class Members
45
9
  */
@@ -48,7 +12,7 @@ export default class Members extends StatelessWebexPlugin {
48
12
  locusUrl: any;
49
13
  mediaShareContentId: any;
50
14
  mediaShareWhiteboardId: any;
51
- membersCollection: any;
15
+ membersCollection: MembersCollection;
52
16
  membersRequest: any;
53
17
  receiveSlotManager: ReceiveSlotManager;
54
18
  mediaRequestManagers: {
@@ -99,6 +63,15 @@ export default class Members extends StatelessWebexPlugin {
99
63
  * @memberof Members
100
64
  */
101
65
  clearMembers(): void;
66
+ /**
67
+ * Updates properties on members that rely on information from other members.
68
+ * This function MUST be called only after the membersCollection has been fully updated
69
+ * @param {UpdatedMembers} membersUpdate
70
+ * @returns {Object} membersCollection
71
+ * @private
72
+ * @memberof Members
73
+ */
74
+ private updateRelationsBetweenMembers;
102
75
  /**
103
76
  * when new participant updates come in, both delta and full participants, update them in members collection
104
77
  * delta object in the event will have {updated, added} and full will be the full membersCollection
@@ -147,7 +120,7 @@ export default class Members extends StatelessWebexPlugin {
147
120
  }): void;
148
121
  /**
149
122
  * sets values in the members collection for updated and added properties from delta
150
- * @param {Object} membersUpdate {updated: [], added: []}
123
+ * @param {UpdatedMembers} membersUpdate
151
124
  * @returns {Object} membersCollection
152
125
  * @private
153
126
  * @memberof Members
@@ -156,6 +129,7 @@ export default class Members extends StatelessWebexPlugin {
156
129
  /**
157
130
  * set members to the member collection from each updated/added lists as passed in
158
131
  * @param {Array} list
132
+ * @param {boolean} isUpdate
159
133
  * @returns {undefined}
160
134
  * @private
161
135
  * @memberof Members
@@ -164,7 +138,7 @@ export default class Members extends StatelessWebexPlugin {
164
138
  /**
165
139
  * Internal update the participants value
166
140
  * @param {Object} payload
167
- * @returns {Object}
141
+ * @returns {UpdatedMembers}
168
142
  * @private
169
143
  * @memberof Members
170
144
  */
@@ -231,7 +205,7 @@ export default class Members extends StatelessWebexPlugin {
231
205
  * Removed/left members will end up in updates
232
206
  * Each array contains only members
233
207
  * @param {Array} participants the locus participants
234
- * @returns {Object} {added: {Array}, updated: {Array}}
208
+ * @returns {UpdatedMembers} {added: {Array}, updated: {Array}}
235
209
  * @private
236
210
  * @memberof Members
237
211
  */
@@ -346,7 +320,7 @@ export default class Members extends StatelessWebexPlugin {
346
320
  * @param {number} csi
347
321
  * @returns {Member}
348
322
  */
349
- findMemberByCsi(csi: any): unknown;
323
+ findMemberByCsi(csi: any): Member;
350
324
  /**
351
325
  * Returns an array of a member's CSIs matching the mediaType and mediaContent
352
326
  *
@@ -458,7 +458,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
458
458
  }, _callee7);
459
459
  }))();
460
460
  },
461
- version: "3.8.0-next.81"
461
+ version: "3.8.0-next.83"
462
462
  });
463
463
  var _default = exports.default = Webinar;
464
464
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -43,13 +43,13 @@
43
43
  "@webex/eslint-config-legacy": "0.0.0",
44
44
  "@webex/jest-config-legacy": "0.0.0",
45
45
  "@webex/legacy-tools": "0.0.0",
46
- "@webex/plugin-meetings": "3.8.0-next.81",
47
- "@webex/plugin-rooms": "3.8.0-next.27",
48
- "@webex/test-helper-chai": "3.8.0-next.22",
49
- "@webex/test-helper-mocha": "3.8.0-next.22",
50
- "@webex/test-helper-mock-webex": "3.8.0-next.22",
51
- "@webex/test-helper-retry": "3.8.0-next.22",
52
- "@webex/test-helper-test-users": "3.8.0-next.22",
46
+ "@webex/plugin-meetings": "3.8.0-next.83",
47
+ "@webex/plugin-rooms": "3.8.0-next.28",
48
+ "@webex/test-helper-chai": "3.8.0-next.23",
49
+ "@webex/test-helper-mocha": "3.8.0-next.23",
50
+ "@webex/test-helper-mock-webex": "3.8.0-next.23",
51
+ "@webex/test-helper-retry": "3.8.0-next.23",
52
+ "@webex/test-helper-test-users": "3.8.0-next.23",
53
53
  "chai": "^4.3.4",
54
54
  "chai-as-promised": "^7.1.1",
55
55
  "eslint": "^8.24.0",
@@ -61,23 +61,23 @@
61
61
  "typescript": "^4.7.4"
62
62
  },
63
63
  "dependencies": {
64
- "@webex/common": "3.8.0-next.22",
64
+ "@webex/common": "3.8.0-next.23",
65
65
  "@webex/event-dictionary-ts": "^1.0.1753",
66
66
  "@webex/internal-media-core": "2.17.1",
67
- "@webex/internal-plugin-conversation": "3.8.0-next.27",
68
- "@webex/internal-plugin-device": "3.8.0-next.22",
69
- "@webex/internal-plugin-llm": "3.8.0-next.25",
70
- "@webex/internal-plugin-mercury": "3.8.0-next.24",
71
- "@webex/internal-plugin-metrics": "3.8.0-next.22",
72
- "@webex/internal-plugin-support": "3.8.0-next.27",
73
- "@webex/internal-plugin-user": "3.8.0-next.22",
74
- "@webex/internal-plugin-voicea": "3.8.0-next.81",
75
- "@webex/media-helpers": "3.8.0-next.28",
76
- "@webex/plugin-people": "3.8.0-next.24",
77
- "@webex/plugin-rooms": "3.8.0-next.27",
67
+ "@webex/internal-plugin-conversation": "3.8.0-next.28",
68
+ "@webex/internal-plugin-device": "3.8.0-next.23",
69
+ "@webex/internal-plugin-llm": "3.8.0-next.26",
70
+ "@webex/internal-plugin-mercury": "3.8.0-next.25",
71
+ "@webex/internal-plugin-metrics": "3.8.0-next.23",
72
+ "@webex/internal-plugin-support": "3.8.0-next.28",
73
+ "@webex/internal-plugin-user": "3.8.0-next.23",
74
+ "@webex/internal-plugin-voicea": "3.8.0-next.83",
75
+ "@webex/media-helpers": "3.8.0-next.29",
76
+ "@webex/plugin-people": "3.8.0-next.25",
77
+ "@webex/plugin-rooms": "3.8.0-next.28",
78
78
  "@webex/ts-sdp": "^1.8.1",
79
79
  "@webex/web-capabilities": "^1.4.0",
80
- "@webex/webex-core": "3.8.0-next.22",
80
+ "@webex/webex-core": "3.8.0-next.23",
81
81
  "ampersand-collection": "^2.0.2",
82
82
  "bowser": "^2.11.0",
83
83
  "btoa": "^1.2.1",
@@ -93,5 +93,5 @@
93
93
  "//": [
94
94
  "TODO: upgrade jwt-decode when moving to node 18"
95
95
  ],
96
- "version": "3.8.0-next.81"
96
+ "version": "3.8.0-next.83"
97
97
  }