@webex/plugin-meetings 3.7.0-next.21 → 3.7.0-next.23

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.
Files changed (46) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/constants.js +2 -0
  4. package/dist/constants.js.map +1 -1
  5. package/dist/interpretation/index.js +1 -1
  6. package/dist/interpretation/siLanguage.js +1 -1
  7. package/dist/locus-info/index.js +8 -0
  8. package/dist/locus-info/index.js.map +1 -1
  9. package/dist/locus-info/selfUtils.js +20 -11
  10. package/dist/locus-info/selfUtils.js.map +1 -1
  11. package/dist/meeting/index.js +718 -646
  12. package/dist/meeting/index.js.map +1 -1
  13. package/dist/meeting/request.js +30 -0
  14. package/dist/meeting/request.js.map +1 -1
  15. package/dist/meeting/request.type.js.map +1 -1
  16. package/dist/member/index.js +9 -0
  17. package/dist/member/index.js.map +1 -1
  18. package/dist/member/types.js.map +1 -1
  19. package/dist/member/util.js +39 -28
  20. package/dist/member/util.js.map +1 -1
  21. package/dist/multistream/sendSlotManager.js +24 -0
  22. package/dist/multistream/sendSlotManager.js.map +1 -1
  23. package/dist/types/constants.d.ts +2 -0
  24. package/dist/types/meeting/index.d.ts +8 -0
  25. package/dist/types/meeting/request.d.ts +12 -1
  26. package/dist/types/meeting/request.type.d.ts +6 -0
  27. package/dist/types/member/index.d.ts +1 -0
  28. package/dist/types/member/types.d.ts +7 -0
  29. package/dist/types/multistream/sendSlotManager.d.ts +8 -1
  30. package/dist/webinar/index.js +1 -1
  31. package/package.json +3 -3
  32. package/src/constants.ts +2 -0
  33. package/src/locus-info/index.ts +13 -0
  34. package/src/locus-info/selfUtils.ts +6 -0
  35. package/src/meeting/index.ts +67 -0
  36. package/src/meeting/request.ts +26 -1
  37. package/src/meeting/request.type.ts +7 -0
  38. package/src/member/index.ts +9 -0
  39. package/src/member/types.ts +8 -0
  40. package/src/member/util.ts +34 -24
  41. package/src/multistream/sendSlotManager.ts +31 -0
  42. package/test/unit/spec/locus-info/index.js +93 -0
  43. package/test/unit/spec/locus-info/selfConstant.js +7 -0
  44. package/test/unit/spec/locus-info/selfUtils.js +39 -0
  45. package/test/unit/spec/meeting/index.js +153 -0
  46. package/test/unit/spec/member/util.js +46 -11
@@ -12,7 +12,7 @@ var _parameter = _interopRequireDefault(require("../common/errors/parameter"));
12
12
  var MemberUtil = {};
13
13
 
14
14
  /**
15
- * @param {Object} participant the locus participant
15
+ * @param {Object} participant - The locus participant object.
16
16
  * @returns {Boolean}
17
17
  */
18
18
  MemberUtil.canReclaimHost = function (participant) {
@@ -23,7 +23,7 @@ MemberUtil.canReclaimHost = function (participant) {
23
23
  };
24
24
 
25
25
  /**
26
- * @param {Object} participant the locus participant
26
+ * @param {Object} participant - The locus participant object.
27
27
  * @returns {[ServerRoleShape]}
28
28
  */
29
29
  MemberUtil.getControlsRoles = function (participant) {
@@ -32,7 +32,18 @@ MemberUtil.getControlsRoles = function (participant) {
32
32
  };
33
33
 
34
34
  /**
35
- * @param {Object} participant the locus participant
35
+ * Checks if the participant has the brb status enabled.
36
+ *
37
+ * @param {ParticipantWithBrb} participant - The locus participant object.
38
+ * @returns {boolean} - True if the participant has brb enabled, false otherwise.
39
+ */
40
+ MemberUtil.isBrb = function (participant) {
41
+ var _participant$controls3;
42
+ return ((_participant$controls3 = participant.controls.brb) === null || _participant$controls3 === void 0 ? void 0 : _participant$controls3.enabled) || false;
43
+ };
44
+
45
+ /**
46
+ * @param {Object} participant - The locus participant object.
36
47
  * @param {ServerRoles} controlRole the search role
37
48
  * @returns {Boolean}
38
49
  */
@@ -44,7 +55,7 @@ MemberUtil.hasRole = function (participant, controlRole) {
44
55
  };
45
56
 
46
57
  /**
47
- * @param {Object} participant the locus participant
58
+ * @param {Object} participant - The locus participant object.
48
59
  * @returns {Boolean}
49
60
  */
50
61
  MemberUtil.hasCohost = function (participant) {
@@ -52,7 +63,7 @@ MemberUtil.hasCohost = function (participant) {
52
63
  };
53
64
 
54
65
  /**
55
- * @param {Object} participant the locus participant
66
+ * @param {Object} participant - The locus participant object.
56
67
  * @returns {Boolean}
57
68
  */
58
69
  MemberUtil.hasModerator = function (participant) {
@@ -60,7 +71,7 @@ MemberUtil.hasModerator = function (participant) {
60
71
  };
61
72
 
62
73
  /**
63
- * @param {Object} participant the locus participant
74
+ * @param {Object} participant - The locus participant object.
64
75
  * @returns {Boolean}
65
76
  */
66
77
  MemberUtil.hasPresenter = function (participant) {
@@ -68,7 +79,7 @@ MemberUtil.hasPresenter = function (participant) {
68
79
  };
69
80
 
70
81
  /**
71
- * @param {Object} participant the locus participant
82
+ * @param {Object} participant - The locus participant object.
72
83
  * @returns {IExternalRoles}
73
84
  */
74
85
  MemberUtil.extractControlRoles = function (participant) {
@@ -81,7 +92,7 @@ MemberUtil.extractControlRoles = function (participant) {
81
92
  };
82
93
 
83
94
  /**
84
- * @param {Object} participant the locus participant
95
+ * @param {Object} participant - The locus participant object.
85
96
  * @returns {Boolean}
86
97
  */
87
98
  MemberUtil.isUser = function (participant) {
@@ -92,7 +103,7 @@ MemberUtil.isModerator = function (participant) {
92
103
  };
93
104
 
94
105
  /**
95
- * @param {Object} participant the locus participant
106
+ * @param {Object} participant - The locus participant object.
96
107
  * @returns {Boolean}
97
108
  */
98
109
  MemberUtil.isGuest = function (participant) {
@@ -100,7 +111,7 @@ MemberUtil.isGuest = function (participant) {
100
111
  };
101
112
 
102
113
  /**
103
- * @param {Object} participant the locus participant
114
+ * @param {Object} participant - The locus participant object.
104
115
  * @returns {Boolean}
105
116
  */
106
117
  MemberUtil.isDevice = function (participant) {
@@ -113,7 +124,7 @@ MemberUtil.isModeratorAssignmentProhibited = function (participant) {
113
124
  /**
114
125
  * checks to see if the participant id is the same as the passed id
115
126
  * there are multiple ids that can be used
116
- * @param {Object} participant the locus participant
127
+ * @param {Object} participant - The locus participant object.
117
128
  * @param {String} id
118
129
  * @returns {Boolean}
119
130
  */
@@ -124,7 +135,7 @@ MemberUtil.isSame = function (participant, id) {
124
135
  /**
125
136
  * checks to see if the participant id is the same as the passed id for associated devices
126
137
  * there are multiple ids that can be used
127
- * @param {Object} participant the locus participant
138
+ * @param {Object} participant - The locus participant object.
128
139
  * @param {String} id
129
140
  * @returns {Boolean}
130
141
  */
@@ -135,7 +146,7 @@ MemberUtil.isAssociatedSame = function (participant, id) {
135
146
  };
136
147
 
137
148
  /**
138
- * @param {Object} participant the locus participant
149
+ * @param {Object} participant - The locus participant object.
139
150
  * @param {Boolean} isGuest
140
151
  * @param {String} status
141
152
  * @returns {Boolean}
@@ -149,7 +160,7 @@ MemberUtil.isNotAdmitted = function (participant, isGuest, status) {
149
160
  };
150
161
 
151
162
  /**
152
- * @param {Object} participant the locus participant
163
+ * @param {Object} participant - The locus participant object.
153
164
  * @returns {Boolean}
154
165
  */
155
166
  MemberUtil.isAudioMuted = function (participant) {
@@ -160,7 +171,7 @@ MemberUtil.isAudioMuted = function (participant) {
160
171
  };
161
172
 
162
173
  /**
163
- * @param {Object} participant the locus participant
174
+ * @param {Object} participant - The locus participant object.
164
175
  * @returns {Boolean}
165
176
  */
166
177
  MemberUtil.isVideoMuted = function (participant) {
@@ -171,19 +182,19 @@ MemberUtil.isVideoMuted = function (participant) {
171
182
  };
172
183
 
173
184
  /**
174
- * @param {Object} participant the locus participant
185
+ * @param {Object} participant - The locus participant object.
175
186
  * @returns {Boolean}
176
187
  */
177
188
  MemberUtil.isHandRaised = function (participant) {
178
- var _participant$controls3, _participant$controls4;
189
+ var _participant$controls4, _participant$controls5;
179
190
  if (!participant) {
180
191
  throw new _parameter.default('Raise hand could not be processed, participant is undefined.');
181
192
  }
182
- return ((_participant$controls3 = participant.controls) === null || _participant$controls3 === void 0 ? void 0 : (_participant$controls4 = _participant$controls3.hand) === null || _participant$controls4 === void 0 ? void 0 : _participant$controls4.raised) || false;
193
+ return ((_participant$controls4 = participant.controls) === null || _participant$controls4 === void 0 ? void 0 : (_participant$controls5 = _participant$controls4.hand) === null || _participant$controls5 === void 0 ? void 0 : _participant$controls5.raised) || false;
183
194
  };
184
195
 
185
196
  /**
186
- * @param {Object} participant the locus participant
197
+ * @param {Object} participant - The locus participant object.
187
198
  * @returns {Boolean}
188
199
  */
189
200
  MemberUtil.isBreakoutsSupported = function (participant) {
@@ -194,7 +205,7 @@ MemberUtil.isBreakoutsSupported = function (participant) {
194
205
  };
195
206
 
196
207
  /**
197
- * @param {Object} participant the locus participant
208
+ * @param {Object} participant - The locus participant object.
198
209
  * @returns {Boolean}
199
210
  */
200
211
  MemberUtil.isInterpretationSupported = function (participant) {
@@ -205,7 +216,7 @@ MemberUtil.isInterpretationSupported = function (participant) {
205
216
  };
206
217
 
207
218
  /**
208
- * @param {Object} participant the locus participant
219
+ * @param {Object} participant - The locus participant object.
209
220
  * @returns {Boolean}
210
221
  */
211
222
  MemberUtil.isLiveAnnotationSupported = function (participant) {
@@ -223,9 +234,9 @@ MemberUtil.isLiveAnnotationSupported = function (participant) {
223
234
  * @returns {Boolean | undefined}
224
235
  */
225
236
  MemberUtil.isMuted = function (participant, statusAccessor, controlsAccessor) {
226
- var _participant$controls5, _participant$controls6, _participant$status;
237
+ var _participant$controls6, _participant$controls7, _participant$status;
227
238
  // check remote mute
228
- var remoteMute = participant === null || participant === void 0 ? void 0 : (_participant$controls5 = participant.controls) === null || _participant$controls5 === void 0 ? void 0 : (_participant$controls6 = _participant$controls5[controlsAccessor]) === null || _participant$controls6 === void 0 ? void 0 : _participant$controls6.muted;
239
+ var remoteMute = participant === null || participant === void 0 ? void 0 : (_participant$controls6 = participant.controls) === null || _participant$controls6 === void 0 ? void 0 : (_participant$controls7 = _participant$controls6[controlsAccessor]) === null || _participant$controls7 === void 0 ? void 0 : _participant$controls7.muted;
229
240
  if (remoteMute === true) {
230
241
  return true;
231
242
  }
@@ -257,7 +268,7 @@ MemberUtil.getRecordingMember = function (controls) {
257
268
  };
258
269
 
259
270
  /**
260
- * @param {Object} participant the locus participant
271
+ * @param {Object} participant - The locus participant object.
261
272
  * @returns {Boolean}
262
273
  */
263
274
  MemberUtil.isRecording = function (participant) {
@@ -298,7 +309,7 @@ MemberUtil.isMutable = function (isSelf, isDevice, isInMeeting, isMuted, type) {
298
309
  };
299
310
 
300
311
  /**
301
- * @param {Object} participant the locus participant
312
+ * @param {Object} participant - The locus participant object.
302
313
  * @returns {String}
303
314
  */
304
315
  MemberUtil.extractStatus = function (participant) {
@@ -324,7 +335,7 @@ MemberUtil.extractStatus = function (participant) {
324
335
  };
325
336
 
326
337
  /**
327
- * @param {Object} participant the locus participant
338
+ * @param {Object} participant - The locus participant object.
328
339
  * @returns {String}
329
340
  */
330
341
  MemberUtil.extractId = function (participant) {
@@ -336,7 +347,7 @@ MemberUtil.extractId = function (participant) {
336
347
 
337
348
  /**
338
349
  * extracts the media status from nested participant object
339
- * @param {Object} participant the locus participant
350
+ * @param {Object} participant - The locus participant object.
340
351
  * @returns {Object}
341
352
  */
342
353
  MemberUtil.extractMediaStatus = function (participant) {
@@ -351,7 +362,7 @@ MemberUtil.extractMediaStatus = function (participant) {
351
362
  };
352
363
 
353
364
  /**
354
- * @param {Object} participant the locus participant
365
+ * @param {Object} participant - The locus participant object.
355
366
  * @returns {String}
356
367
  */
357
368
  MemberUtil.extractName = function (participant) {
@@ -1 +1 @@
1
- {"version":3,"names":["_types","require","_constants","_parameter","_interopRequireDefault","MemberUtil","canReclaimHost","participant","ParameterError","canReclaimHostRole","getControlsRoles","_participant$controls","_participant$controls2","controls","role","roles","hasRole","controlRole","_MemberUtil$getContro","some","type","hasCohost","ServerRoles","Cohost","hasModerator","Moderator","hasPresenter","Presenter","extractControlRoles","cohost","moderator","presenter","isUser","_USER_","isModerator","isGuest","guest","isDevice","_RESOURCE_ROOM_","isModeratorAssignmentProhibited","moderatorAssignmentNotAllowed","isSame","id","person","isAssociatedSame","associatedUsers","user","isNotAdmitted","status","devices","intent","_WAIT_","_IN_LOBBY_","_IN_MEETING_","isAudioMuted","isMuted","AUDIO_STATUS","AUDIO","isVideoMuted","VIDEO_STATUS","VIDEO","isHandRaised","_participant$controls3","_participant$controls4","hand","raised","isBreakoutsSupported","doesNotSupportBreakouts","isInterpretationSupported","doesNotSupportSiInterpreter","isLiveAnnotationSupported","annotatorAssignmentNotAllowed","statusAccessor","controlsAccessor","_participant$controls5","_participant$controls6","_participant$status","remoteMute","muted","localStatus","_RECEIVE_ONLY_","_SEND_RECEIVE_","getRecordingMember","record","recording","meta","modifiedBy","isRecording","localRecord","isRemovable","isSelf","isInMeeting","_CALL_","isMutable","extractStatus","length","_NOT_IN_MEETING_","state","_JOINED_","_IDLE_","foundDevice","find","device","_OBSERVE_","_LEFT_","extractId","extractMediaStatus","_participant$status2","_participant$status3","audio","audioStatus","video","videoStatus","extractName","name","_default","exports","default"],"sources":["util.ts"],"sourcesContent":["import {\n IExternalRoles,\n ParticipantWithRoles,\n ServerRoles,\n ServerRoleShape,\n IMediaStatus,\n} from './types';\nimport {\n _USER_,\n _RESOURCE_ROOM_,\n _OBSERVE_,\n _WAIT_,\n _LEFT_,\n _JOINED_,\n _IDLE_,\n _IN_LOBBY_,\n _NOT_IN_MEETING_,\n _IN_MEETING_,\n AUDIO_STATUS,\n VIDEO_STATUS,\n _SEND_RECEIVE_,\n _RECEIVE_ONLY_,\n _CALL_,\n VIDEO,\n AUDIO,\n} from '../constants';\nimport ParameterError from '../common/errors/parameter';\n\nconst MemberUtil: any = {};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.canReclaimHost = (participant) => {\n if (!participant) {\n throw new ParameterError(\n 'canReclaimHostRole could not be processed, participant is undefined.'\n );\n }\n\n return participant.canReclaimHostRole || false;\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {[ServerRoleShape]}\n */\nMemberUtil.getControlsRoles = (participant: ParticipantWithRoles): Array<ServerRoleShape> =>\n participant?.controls?.role?.roles;\n\n/**\n * @param {Object} participant the locus participant\n * @param {ServerRoles} controlRole the search role\n * @returns {Boolean}\n */\nMemberUtil.hasRole = (participant: any, controlRole: ServerRoles): boolean =>\n MemberUtil.getControlsRoles(participant)?.some(\n (role) => role.type === controlRole && role.hasRole\n );\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.hasCohost = (participant: ParticipantWithRoles): boolean =>\n MemberUtil.hasRole(participant, ServerRoles.Cohost) || false;\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.hasModerator = (participant: ParticipantWithRoles): boolean =>\n MemberUtil.hasRole(participant, ServerRoles.Moderator) || false;\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.hasPresenter = (participant: ParticipantWithRoles): boolean =>\n MemberUtil.hasRole(participant, ServerRoles.Presenter) || false;\n\n/**\n * @param {Object} participant the locus participant\n * @returns {IExternalRoles}\n */\nMemberUtil.extractControlRoles = (participant: ParticipantWithRoles): IExternalRoles => {\n const roles = {\n cohost: MemberUtil.hasCohost(participant),\n moderator: MemberUtil.hasModerator(participant),\n presenter: MemberUtil.hasPresenter(participant),\n };\n\n return roles;\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isUser = (participant: any) => participant && participant.type === _USER_;\n\nMemberUtil.isModerator = (participant) => participant && participant.moderator;\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isGuest = (participant: any) => participant && participant.guest;\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isDevice = (participant: any) => participant && participant.type === _RESOURCE_ROOM_;\n\nMemberUtil.isModeratorAssignmentProhibited = (participant) =>\n participant && participant.moderatorAssignmentNotAllowed;\n\n/**\n * checks to see if the participant id is the same as the passed id\n * there are multiple ids that can be used\n * @param {Object} participant the locus participant\n * @param {String} id\n * @returns {Boolean}\n */\nMemberUtil.isSame = (participant: any, id: string) =>\n participant && (participant.id === id || (participant.person && participant.person.id === id));\n\n/**\n * checks to see if the participant id is the same as the passed id for associated devices\n * there are multiple ids that can be used\n * @param {Object} participant the locus participant\n * @param {String} id\n * @returns {Boolean}\n */\nMemberUtil.isAssociatedSame = (participant: any, id: string) =>\n participant &&\n participant.associatedUsers &&\n participant.associatedUsers.some(\n (user) => user.id === id || (user.person && user.person.id === id)\n );\n\n/**\n * @param {Object} participant the locus participant\n * @param {Boolean} isGuest\n * @param {String} status\n * @returns {Boolean}\n */\nMemberUtil.isNotAdmitted = (participant: any, isGuest: boolean, status: string): boolean =>\n participant &&\n participant.guest &&\n ((participant.devices &&\n participant.devices[0] &&\n participant.devices[0].intent &&\n participant.devices[0].intent.type === _WAIT_ &&\n // @ts-ignore\n isGuest &&\n status === _IN_LOBBY_) ||\n // @ts-ignore\n !status === _IN_MEETING_);\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isAudioMuted = (participant: any) => {\n if (!participant) {\n throw new ParameterError('Audio could not be processed, participant is undefined.');\n }\n\n return MemberUtil.isMuted(participant, AUDIO_STATUS, AUDIO);\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isVideoMuted = (participant: any): boolean => {\n if (!participant) {\n throw new ParameterError('Video could not be processed, participant is undefined.');\n }\n\n return MemberUtil.isMuted(participant, VIDEO_STATUS, VIDEO);\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isHandRaised = (participant: any) => {\n if (!participant) {\n throw new ParameterError('Raise hand could not be processed, participant is undefined.');\n }\n\n return participant.controls?.hand?.raised || false;\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isBreakoutsSupported = (participant) => {\n if (!participant) {\n throw new ParameterError('Breakout support could not be processed, participant is undefined.');\n }\n\n return !participant.doesNotSupportBreakouts;\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isInterpretationSupported = (participant) => {\n if (!participant) {\n throw new ParameterError(\n 'Interpretation support could not be processed, participant is undefined.'\n );\n }\n\n return !participant.doesNotSupportSiInterpreter;\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isLiveAnnotationSupported = (participant) => {\n if (!participant) {\n throw new ParameterError(\n 'LiveAnnotation support could not be processed, participant is undefined.'\n );\n }\n\n return !participant.annotatorAssignmentNotAllowed;\n};\n\n/**\n * utility method for audio/video muted status\n * @param {any} participant\n * @param {String} statusAccessor\n * @param {String} controlsAccessor\n * @returns {Boolean | undefined}\n */\nMemberUtil.isMuted = (participant: any, statusAccessor: string, controlsAccessor: string) => {\n // check remote mute\n const remoteMute = participant?.controls?.[controlsAccessor]?.muted;\n if (remoteMute === true) {\n return true;\n }\n\n // check local mute\n const localStatus = participant?.status?.[statusAccessor];\n if (localStatus === _RECEIVE_ONLY_) {\n return true;\n }\n if (localStatus === _SEND_RECEIVE_) {\n return false;\n }\n\n return remoteMute;\n};\n\n/**\n * utility method for getting the recording member for later comparison\n * @param {Object} controls\n * @returns {String|null}\n */\nMemberUtil.getRecordingMember = (controls: any) => {\n if (!controls) {\n return null;\n }\n if (controls.record && controls.record.recording && controls.record.meta) {\n return controls.record.meta.modifiedBy;\n }\n\n return null;\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isRecording = (participant: any) => {\n if (!participant) {\n throw new ParameterError('Recording could not be processed, participant is undefined.');\n }\n if (participant.controls && participant.controls.localRecord) {\n return participant.controls.localRecord.recording;\n }\n\n return false;\n};\n\nMemberUtil.isRemovable = (isSelf, isGuest, isInMeeting, type) => {\n if (isGuest || isSelf) {\n return false;\n }\n if (type === _CALL_) {\n return false;\n }\n if (isInMeeting) {\n return true;\n }\n\n return false;\n};\n\nMemberUtil.isMutable = (isSelf, isDevice, isInMeeting, isMuted, type) => {\n if (!isInMeeting) {\n return false;\n }\n if (isMuted) {\n return false;\n }\n if (type === _CALL_) {\n return false;\n }\n if (isSelf || isDevice) {\n return true;\n }\n\n return false;\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {String}\n */\nMemberUtil.extractStatus = (participant: any) => {\n if (!(participant && participant.devices && participant.devices.length)) {\n return _NOT_IN_MEETING_;\n }\n if (participant.state === _JOINED_) {\n return _IN_MEETING_;\n }\n if (participant.state === _IDLE_) {\n if (participant.devices && participant.devices.length > 0) {\n const foundDevice = participant.devices.find(\n (device) =>\n device.intent && (device.intent.type === _WAIT_ || device.intent.type === _OBSERVE_)\n );\n\n return foundDevice ? _IN_LOBBY_ : _NOT_IN_MEETING_;\n }\n\n return _NOT_IN_MEETING_;\n }\n if (participant.state === _LEFT_) {\n return _NOT_IN_MEETING_;\n }\n\n return _NOT_IN_MEETING_;\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {String}\n */\nMemberUtil.extractId = (participant: any) => {\n if (participant) {\n return participant.id;\n }\n\n return null;\n};\n\n/**\n * extracts the media status from nested participant object\n * @param {Object} participant the locus participant\n * @returns {Object}\n */\nMemberUtil.extractMediaStatus = (participant: any): IMediaStatus => {\n if (!participant) {\n throw new ParameterError('Media status could not be extracted, participant is undefined.');\n }\n\n return {\n audio: participant.status?.audioStatus,\n video: participant.status?.videoStatus,\n };\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {String}\n */\nMemberUtil.extractName = (participant: any) => {\n if (participant && participant.person) {\n return participant.person.name;\n }\n\n return null;\n};\n\nexport default MemberUtil;\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAOA,IAAAC,UAAA,GAAAD,OAAA;AAmBA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAMI,UAAe,GAAG,CAAC,CAAC;;AAE1B;AACA;AACA;AACA;AACAA,UAAU,CAACC,cAAc,GAAG,UAACC,WAAW,EAAK;EAC3C,IAAI,CAACA,WAAW,EAAE;IAChB,MAAM,IAAIC,kBAAc,CACtB,sEACF,CAAC;EACH;EAEA,OAAOD,WAAW,CAACE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MAAM,CAAC9B,IAAI,KAAKmF,oBAAS,CAAC;MAAA,CACxF,CAAC;MAED,OAAOH,WAAW,GAAGhD,qBAAU,GAAG4C,2BAAgB;IACpD;IAEA,OAAOA,2BAAgB;EACzB;EACA,IAAIzF,WAAW,CAAC0F,KAAK,KAAKO,iBAAM,EAAE;IAChC,OAAOR,2BAAgB;EACzB;EAEA,OAAOA,2BAAgB;AACzB,CAAC;;AAED;AACA;AACA;AACA;AACA3F,UAAU,CAACoG,SAAS,GAAG,UAAClG,WAAgB,EAAK;EAC3C,IAAIA,WAAW,EAAE;IACf,OAAOA,WAAW,CAACmC,EAAE;EACvB;EAEA,OAAO,IAAI;AACb,CAAC;;AAED;AACA;AACA;AACA;AACA;AACArC,UAAU,CAACqG,kBAAkB,GAAG,UAACnG,WAAgB,EAAmB;EAAA,IAAAoG,oBAAA,EAAAC,oBAAA;EAClE,IAAI,CAACrG,WAAW,EAAE;IAChB,MAAM,IAAIC,kBAAc,CAAC,gEAAgE,CAAC;EAC5F;EAEA,OAAO;IACLqG,KAAK,GAAAF,oBAAA,GAAEpG,WAAW,CAACyC,MAAM,cAAA2D,oBAAA,uBAAlBA,oBAAA,CAAoBG,WAAW;IACtCC,KAAK,GAAAH,oBAAA,GAAErG,WAAW,CAACyC,MAAM,cAAA4D,oBAAA,uBAAlBA,oBAAA,CAAoBI;EAC7B,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA3G,UAAU,CAAC4G,WAAW,GAAG,UAAC1G,WAAgB,EAAK;EAC7C,IAAIA,WAAW,IAAIA,WAAW,CAACoC,MAAM,EAAE;IACrC,OAAOpC,WAAW,CAACoC,MAAM,CAACuE,IAAI;EAChC;EAEA,OAAO,IAAI;AACb,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEahH,UAAU"}
1
+ {"version":3,"names":["_types","require","_constants","_parameter","_interopRequireDefault","MemberUtil","canReclaimHost","participant","ParameterError","canReclaimHostRole","getControlsRoles","_participant$controls","_participant$controls2","controls","role","roles","isBrb","_participant$controls3","brb","enabled","hasRole","controlRole","_MemberUtil$getContro","some","type","hasCohost","ServerRoles","Cohost","hasModerator","Moderator","hasPresenter","Presenter","extractControlRoles","cohost","moderator","presenter","isUser","_USER_","isModerator","isGuest","guest","isDevice","_RESOURCE_ROOM_","isModeratorAssignmentProhibited","moderatorAssignmentNotAllowed","isSame","id","person","isAssociatedSame","associatedUsers","user","isNotAdmitted","status","devices","intent","_WAIT_","_IN_LOBBY_","_IN_MEETING_","isAudioMuted","isMuted","AUDIO_STATUS","AUDIO","isVideoMuted","VIDEO_STATUS","VIDEO","isHandRaised","_participant$controls4","_participant$controls5","hand","raised","isBreakoutsSupported","doesNotSupportBreakouts","isInterpretationSupported","doesNotSupportSiInterpreter","isLiveAnnotationSupported","annotatorAssignmentNotAllowed","statusAccessor","controlsAccessor","_participant$controls6","_participant$controls7","_participant$status","remoteMute","muted","localStatus","_RECEIVE_ONLY_","_SEND_RECEIVE_","getRecordingMember","record","recording","meta","modifiedBy","isRecording","localRecord","isRemovable","isSelf","isInMeeting","_CALL_","isMutable","extractStatus","length","_NOT_IN_MEETING_","state","_JOINED_","_IDLE_","foundDevice","find","device","_OBSERVE_","_LEFT_","extractId","extractMediaStatus","_participant$status2","_participant$status3","audio","audioStatus","video","videoStatus","extractName","name","_default","exports","default"],"sources":["util.ts"],"sourcesContent":["import {\n IExternalRoles,\n ParticipantWithRoles,\n ServerRoles,\n ServerRoleShape,\n IMediaStatus,\n ParticipantWithBrb,\n} from './types';\nimport {\n _USER_,\n _RESOURCE_ROOM_,\n _OBSERVE_,\n _WAIT_,\n _LEFT_,\n _JOINED_,\n _IDLE_,\n _IN_LOBBY_,\n _NOT_IN_MEETING_,\n _IN_MEETING_,\n AUDIO_STATUS,\n VIDEO_STATUS,\n _SEND_RECEIVE_,\n _RECEIVE_ONLY_,\n _CALL_,\n VIDEO,\n AUDIO,\n} from '../constants';\nimport ParameterError from '../common/errors/parameter';\n\nconst MemberUtil: any = {};\n\n/**\n * @param {Object} participant - The locus participant object.\n * @returns {Boolean}\n */\nMemberUtil.canReclaimHost = (participant) => {\n if (!participant) {\n throw new ParameterError(\n 'canReclaimHostRole could not be processed, participant is undefined.'\n );\n }\n\n return participant.canReclaimHostRole || false;\n};\n\n/**\n * @param {Object} participant - The locus participant object.\n * @returns {[ServerRoleShape]}\n */\nMemberUtil.getControlsRoles = (participant: ParticipantWithRoles): Array<ServerRoleShape> =>\n participant?.controls?.role?.roles;\n\n/**\n * Checks if the participant has the brb status enabled.\n *\n * @param {ParticipantWithBrb} participant - The locus participant object.\n * @returns {boolean} - True if the participant has brb enabled, false otherwise.\n */\nMemberUtil.isBrb = (participant: ParticipantWithBrb): boolean =>\n participant.controls.brb?.enabled || false;\n\n/**\n * @param {Object} participant - The locus participant object.\n * @param {ServerRoles} controlRole the search role\n * @returns {Boolean}\n */\nMemberUtil.hasRole = (participant: any, controlRole: ServerRoles): boolean =>\n MemberUtil.getControlsRoles(participant)?.some(\n (role) => role.type === controlRole && role.hasRole\n );\n\n/**\n * @param {Object} participant - The locus participant object.\n * @returns {Boolean}\n */\nMemberUtil.hasCohost = (participant: ParticipantWithRoles): boolean =>\n MemberUtil.hasRole(participant, ServerRoles.Cohost) || false;\n\n/**\n * @param {Object} participant - The locus participant object.\n * @returns {Boolean}\n */\nMemberUtil.hasModerator = (participant: ParticipantWithRoles): boolean =>\n MemberUtil.hasRole(participant, ServerRoles.Moderator) || false;\n\n/**\n * @param {Object} participant - The locus participant object.\n * @returns {Boolean}\n */\nMemberUtil.hasPresenter = (participant: ParticipantWithRoles): boolean =>\n MemberUtil.hasRole(participant, ServerRoles.Presenter) || false;\n\n/**\n * @param {Object} participant - The locus participant object.\n * @returns {IExternalRoles}\n */\nMemberUtil.extractControlRoles = (participant: ParticipantWithRoles): IExternalRoles => {\n const roles = {\n cohost: MemberUtil.hasCohost(participant),\n moderator: MemberUtil.hasModerator(participant),\n presenter: MemberUtil.hasPresenter(participant),\n };\n\n return roles;\n};\n\n/**\n * @param {Object} participant - The locus participant object.\n * @returns {Boolean}\n */\nMemberUtil.isUser = (participant: any) => participant && participant.type === _USER_;\n\nMemberUtil.isModerator = (participant) => participant && participant.moderator;\n\n/**\n * @param {Object} participant - The locus participant object.\n * @returns {Boolean}\n */\nMemberUtil.isGuest = (participant: any) => participant && participant.guest;\n\n/**\n * @param {Object} participant - The locus participant object.\n * @returns {Boolean}\n */\nMemberUtil.isDevice = (participant: any) => participant && participant.type === _RESOURCE_ROOM_;\n\nMemberUtil.isModeratorAssignmentProhibited = (participant) =>\n participant && participant.moderatorAssignmentNotAllowed;\n\n/**\n * checks to see if the participant id is the same as the passed id\n * there are multiple ids that can be used\n * @param {Object} participant - The locus participant object.\n * @param {String} id\n * @returns {Boolean}\n */\nMemberUtil.isSame = (participant: any, id: string) =>\n participant && (participant.id === id || (participant.person && participant.person.id === id));\n\n/**\n * checks to see if the participant id is the same as the passed id for associated devices\n * there are multiple ids that can be used\n * @param {Object} participant - The locus participant object.\n * @param {String} id\n * @returns {Boolean}\n */\nMemberUtil.isAssociatedSame = (participant: any, id: string) =>\n participant &&\n participant.associatedUsers &&\n participant.associatedUsers.some(\n (user) => user.id === id || (user.person && user.person.id === id)\n );\n\n/**\n * @param {Object} participant - The locus participant object.\n * @param {Boolean} isGuest\n * @param {String} status\n * @returns {Boolean}\n */\nMemberUtil.isNotAdmitted = (participant: any, isGuest: boolean, status: string): boolean =>\n participant &&\n participant.guest &&\n ((participant.devices &&\n participant.devices[0] &&\n participant.devices[0].intent &&\n participant.devices[0].intent.type === _WAIT_ &&\n // @ts-ignore\n isGuest &&\n status === _IN_LOBBY_) ||\n // @ts-ignore\n !status === _IN_MEETING_);\n\n/**\n * @param {Object} participant - The locus participant object.\n * @returns {Boolean}\n */\nMemberUtil.isAudioMuted = (participant: any) => {\n if (!participant) {\n throw new ParameterError('Audio could not be processed, participant is undefined.');\n }\n\n return MemberUtil.isMuted(participant, AUDIO_STATUS, AUDIO);\n};\n\n/**\n * @param {Object} participant - The locus participant object.\n * @returns {Boolean}\n */\nMemberUtil.isVideoMuted = (participant: any): boolean => {\n if (!participant) {\n throw new ParameterError('Video could not be processed, participant is undefined.');\n }\n\n return MemberUtil.isMuted(participant, VIDEO_STATUS, VIDEO);\n};\n\n/**\n * @param {Object} participant - The locus participant object.\n * @returns {Boolean}\n */\nMemberUtil.isHandRaised = (participant: any) => {\n if (!participant) {\n throw new ParameterError('Raise hand could not be processed, participant is undefined.');\n }\n\n return participant.controls?.hand?.raised || false;\n};\n\n/**\n * @param {Object} participant - The locus participant object.\n * @returns {Boolean}\n */\nMemberUtil.isBreakoutsSupported = (participant) => {\n if (!participant) {\n throw new ParameterError('Breakout support could not be processed, participant is undefined.');\n }\n\n return !participant.doesNotSupportBreakouts;\n};\n\n/**\n * @param {Object} participant - The locus participant object.\n * @returns {Boolean}\n */\nMemberUtil.isInterpretationSupported = (participant) => {\n if (!participant) {\n throw new ParameterError(\n 'Interpretation support could not be processed, participant is undefined.'\n );\n }\n\n return !participant.doesNotSupportSiInterpreter;\n};\n\n/**\n * @param {Object} participant - The locus participant object.\n * @returns {Boolean}\n */\nMemberUtil.isLiveAnnotationSupported = (participant) => {\n if (!participant) {\n throw new ParameterError(\n 'LiveAnnotation support could not be processed, participant is undefined.'\n );\n }\n\n return !participant.annotatorAssignmentNotAllowed;\n};\n\n/**\n * utility method for audio/video muted status\n * @param {any} participant\n * @param {String} statusAccessor\n * @param {String} controlsAccessor\n * @returns {Boolean | undefined}\n */\nMemberUtil.isMuted = (participant: any, statusAccessor: string, controlsAccessor: string) => {\n // check remote mute\n const remoteMute = participant?.controls?.[controlsAccessor]?.muted;\n if (remoteMute === true) {\n return true;\n }\n\n // check local mute\n const localStatus = participant?.status?.[statusAccessor];\n if (localStatus === _RECEIVE_ONLY_) {\n return true;\n }\n if (localStatus === _SEND_RECEIVE_) {\n return false;\n }\n\n return remoteMute;\n};\n\n/**\n * utility method for getting the recording member for later comparison\n * @param {Object} controls\n * @returns {String|null}\n */\nMemberUtil.getRecordingMember = (controls: any) => {\n if (!controls) {\n return null;\n }\n if (controls.record && controls.record.recording && controls.record.meta) {\n return controls.record.meta.modifiedBy;\n }\n\n return null;\n};\n\n/**\n * @param {Object} participant - The locus participant object.\n * @returns {Boolean}\n */\nMemberUtil.isRecording = (participant: any) => {\n if (!participant) {\n throw new ParameterError('Recording could not be processed, participant is undefined.');\n }\n if (participant.controls && participant.controls.localRecord) {\n return participant.controls.localRecord.recording;\n }\n\n return false;\n};\n\nMemberUtil.isRemovable = (isSelf, isGuest, isInMeeting, type) => {\n if (isGuest || isSelf) {\n return false;\n }\n if (type === _CALL_) {\n return false;\n }\n if (isInMeeting) {\n return true;\n }\n\n return false;\n};\n\nMemberUtil.isMutable = (isSelf, isDevice, isInMeeting, isMuted, type) => {\n if (!isInMeeting) {\n return false;\n }\n if (isMuted) {\n return false;\n }\n if (type === _CALL_) {\n return false;\n }\n if (isSelf || isDevice) {\n return true;\n }\n\n return false;\n};\n\n/**\n * @param {Object} participant - The locus participant object.\n * @returns {String}\n */\nMemberUtil.extractStatus = (participant: any) => {\n if (!(participant && participant.devices && participant.devices.length)) {\n return _NOT_IN_MEETING_;\n }\n if (participant.state === _JOINED_) {\n return _IN_MEETING_;\n }\n if (participant.state === _IDLE_) {\n if (participant.devices && participant.devices.length > 0) {\n const foundDevice = participant.devices.find(\n (device) =>\n device.intent && (device.intent.type === _WAIT_ || device.intent.type === _OBSERVE_)\n );\n\n return foundDevice ? _IN_LOBBY_ : _NOT_IN_MEETING_;\n }\n\n return _NOT_IN_MEETING_;\n }\n if (participant.state === _LEFT_) {\n return _NOT_IN_MEETING_;\n }\n\n return _NOT_IN_MEETING_;\n};\n\n/**\n * @param {Object} participant - The locus participant object.\n * @returns {String}\n */\nMemberUtil.extractId = (participant: any) => {\n if (participant) {\n return participant.id;\n }\n\n return null;\n};\n\n/**\n * extracts the media status from nested participant object\n * @param {Object} participant - The locus participant object.\n * @returns {Object}\n */\nMemberUtil.extractMediaStatus = (participant: any): IMediaStatus => {\n if (!participant) {\n throw new ParameterError('Media status could not be extracted, participant is undefined.');\n }\n\n return {\n audio: participant.status?.audioStatus,\n video: participant.status?.videoStatus,\n };\n};\n\n/**\n * @param {Object} participant - The locus participant object.\n * @returns {String}\n */\nMemberUtil.extractName = (participant: any) => {\n if (participant && participant.person) {\n return participant.person.name;\n }\n\n return null;\n};\n\nexport default MemberUtil;\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAQA,IAAAC,UAAA,GAAAD,OAAA;AAmBA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAMI,UAAe,GAAG,CAAC,CAAC;;AAE1B;AACA;AACA;AACA;AACAA,UAAU,CAACC,cAAc,GAAG,UAACC,WAAW,EAAK;EAC3C,IAAI,CAACA,WAAW,EAAE;IAChB,MAAM,IAAIC,kBAAc,CACtB,sEACF,CAAC;EACH;EAEA,OAAOD,WAAW,CAACE,kBAAkB,IAAI,KAAK;AAChD,CAAC;;AAED;AACA;AACA;AACA;AACAJ,UAAU,CAACK,gBAAgB,GAAG,UAACH,WAAiC;EAAA,IAAAI,qBAAA,EAAAC,sBAAA;EAAA,OAC9DL,WAAW,aAAXA,WAAW,wBAAAI,qBAAA,GAAXJ,WAAW,CAAEM,QAAQ,cAAAF,qBAAA,wBAAAC,sBAAA,GAArBD,qBAAA,CAAuBG,IAAI,cAAAF,sBAAA,uBAA3BA,sBAAA,CAA6BG,KAAK;AAAA;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACAV,UAAU,CAACW,KAAK,GAAG,UAACT,WAA+B;EAAA,IAAAU,sBAAA;EAAA,OACjD,EAAAA,sBAAA,GAAAV,WAAW,CAACM,QAAQ,CAACK,GAAG,cAAAD,sBAAA,uBAAxBA,sBAAA,CAA0BE,OAAO,KAAI,KAAK;AAAA;;AAE5C;AACA;AACA;AACA;AACA;AACAd,UAAU,CAACe,OAAO,GAAG,UAAC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A,WAAW,CAACuC,EAAE;EACvB;EAEA,OAAO,IAAI;AACb,CAAC;;AAED;AACA;AACA;AACA;AACA;AACAzC,UAAU,CAACyG,kBAAkB,GAAG,UAACvG,WAAgB,EAAmB;EAAA,IAAAwG,oBAAA,EAAAC,oBAAA;EAClE,IAAI,CAACzG,WAAW,EAAE;IAChB,MAAM,IAAIC,kBAAc,CAAC,gEAAgE,CAAC;EAC5F;EAEA,OAAO;IACLyG,KAAK,GAAAF,oBAAA,GAAExG,WAAW,CAAC6C,MAAM,cAAA2D,oBAAA,uBAAlBA,oBAAA,CAAoBG,WAAW;IACtCC,KAAK,GAAAH,oBAAA,GAAEzG,WAAW,CAAC6C,MAAM,cAAA4D,oBAAA,uBAAlBA,oBAAA,CAAoBI;EAC7B,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA/G,UAAU,CAACgH,WAAW,GAAG,UAAC9G,WAAgB,EAAK;EAC7C,IAAIA,WAAW,IAAIA,WAAW,CAACwC,MAAM,EAAE;IACrC,OAAOxC,WAAW,CAACwC,MAAM,CAACuE,IAAI;EAChC;EAEA,OAAO,IAAI;AACb,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEapH,UAAU"}
@@ -77,6 +77,30 @@ var SendSlotManager = exports.default = /*#__PURE__*/function () {
77
77
  this.LoggerProxy.logger.info("SendSlotsManager->setNamedMediaGroups#set named media group ".concat(namedMediaGroups));
78
78
  }
79
79
 
80
+ /**
81
+ * Sets the source state override for the given media type.
82
+ * @param {MediaType} mediaType - The type of media (must be MediaType.VideoMain to apply source state changes).
83
+ * @param {StreamState | null} state - The state to set or null to clear the override value.
84
+ * @returns {void}
85
+ */
86
+ }, {
87
+ key: "setSourceStateOverride",
88
+ value: function setSourceStateOverride(mediaType, state) {
89
+ if (mediaType !== _internalMediaCore.MediaType.VideoMain) {
90
+ throw new Error("sendSlotManager cannot set source state override which media type is ".concat(mediaType));
91
+ }
92
+ var slot = this.slots.get(mediaType);
93
+ if (!slot) {
94
+ throw new Error("Slot for ".concat(mediaType, " does not exist"));
95
+ }
96
+ if (state) {
97
+ slot.setSourceStateOverride(state);
98
+ } else {
99
+ slot.clearSourceStateOverride();
100
+ }
101
+ this.LoggerProxy.logger.info("SendSlotsManager->setSourceStateOverride#set source state override for ".concat(mediaType, " to ").concat(state));
102
+ }
103
+
80
104
  /**
81
105
  * This method publishes the given stream to the sendSlot for the given mediaType
82
106
  * @param {MediaType} mediaType MediaType of the sendSlot to which a stream needs to be published (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
@@ -1 +1 @@
1
- {"version":3,"names":["_internalMediaCore","require","SendSlotManager","exports","default","LoggerProxy","_classCallCheck2","_defineProperty2","_map","_createClass2","key","value","createSlot","mediaConnection","mediaType","active","arguments","length","undefined","slots","has","Error","concat","slot","createSendSlot","set","logger","info","getSlot","get","setNamedMediaGroups","namedMediaGroups","MediaType","AudioMain","_publishStream","_asyncToGenerator2","_regenerator","mark","_callee","stream","wrap","_callee$","_context","prev","next","publishStream","label","muted","stop","_x","_x2","apply","_unpublishStream","_callee2","_callee2$","_context2","unpublishStream","_x3","setActive","_setCodecParameters","_callee3","codecParameters","_callee3$","_context3","setCodecParameters","_x4","_x5","_deleteCodecParameters","_callee4","parameters","_callee4$","_context4","deleteCodecParameters","_x6","_x7","reset","clear"],"sources":["sendSlotManager.ts"],"sourcesContent":["import {\n SendSlot,\n MediaType,\n LocalStream,\n MultistreamRoapMediaConnection,\n NamedMediaGroup,\n} from '@webex/internal-media-core';\n\nexport default class SendSlotManager {\n private readonly slots: Map<MediaType, SendSlot> = new Map();\n private readonly LoggerProxy: any;\n\n constructor(LoggerProxy: any) {\n this.LoggerProxy = LoggerProxy;\n }\n\n /**\n * This method is used to create a sendSlot for the given mediaType and returns the created sendSlot\n * @param {MultistreamRoapMediaConnection} mediaConnection MultistreamRoapMediaConnection for which a sendSlot needs to be created\n * @param {MediaType} mediaType MediaType for which a sendSlot needs to be created (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {boolean} active This is optional boolean to set the active state of the sendSlot. Default is true\n * @returns {SendSlot} slot The created sendSlot\n */\n public createSlot(\n mediaConnection: MultistreamRoapMediaConnection,\n mediaType: MediaType,\n active = true\n ): SendSlot {\n if (this.slots.has(mediaType)) {\n throw new Error(`Slot for ${mediaType} already exists`);\n }\n\n const slot: SendSlot = mediaConnection.createSendSlot(mediaType, active);\n\n this.slots.set(mediaType, slot);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->createSlot#Created slot for ${mediaType} with active ${active}`\n );\n\n return slot;\n }\n\n /**\n * This method is used to retrieve the sendSlot for the given mediaType\n * @param {MediaType} mediaType of which the slot needs to be retrieved\n * @returns {SendSlot}\n */\n public getSlot(mediaType: MediaType): SendSlot {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n return slot;\n }\n\n /**\n * Allow users to specify 'namedMediaGroups' to indicate which named media group its audio should be sent to.\n * @param {MediaType} mediaType MediaType of the sendSlot to which the audio stream needs to be send to the media group\n * @param {[]}namedMediaGroups - Allow users to specify 'namedMediaGroups'.If the value of 'namedMediaGroups' is zero,\n * named media group will be canceled and the audio stream will be sent to the floor.\n * @returns {void}\n */\n public setNamedMediaGroups(mediaType: MediaType, namedMediaGroups: NamedMediaGroup[]) {\n if (mediaType !== MediaType.AudioMain) {\n throw new Error(\n `sendSlotManager cannot set named media group which media type is ${mediaType}`\n );\n }\n\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n slot.setNamedMediaGroups(namedMediaGroups);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->setNamedMediaGroups#set named media group ${namedMediaGroups}`\n );\n }\n\n /**\n * This method publishes the given stream to the sendSlot for the given mediaType\n * @param {MediaType} mediaType MediaType of the sendSlot to which a stream needs to be published (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {LocalStream} stream LocalStream to be published\n * @returns {Promise<void>}\n */\n public async publishStream(mediaType: MediaType, stream: LocalStream): Promise<void> {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n await slot.publishStream(stream);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->publishStream#Published stream for ${mediaType} and stream with label ${stream.label} and muted ${stream.muted}`\n );\n }\n\n /**\n * This method unpublishes the stream from the sendSlot of the given mediaType\n * @param {MediaType} mediaType MediaType of the sendSlot from which a stream needs to be unpublished (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @returns {Promise<void>}\n */\n public async unpublishStream(mediaType: MediaType): Promise<void> {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n await slot.unpublishStream();\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->unpublishStream#Unpublished stream for ${mediaType}`\n );\n }\n\n /**\n * This method is used to set the active state of the sendSlot for the given mediaType\n * @param {MediaType} mediaType The MediaType of the sendSlot for which the active state needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {boolean} active The boolean to set the active state of the sendSlot. Default is true\n * @returns {void}\n */\n public setActive(mediaType: MediaType, active = true): void {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n slot.active = active;\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->setActive#Set active for ${mediaType} to ${active}`\n );\n }\n\n /**\n * This method is used to set the codec parameters for the sendSlot of the given mediaType\n * @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {Object} codecParameters\n * @returns {Promise<void>}\n */\n public async setCodecParameters(\n mediaType: MediaType,\n codecParameters: {\n [key: string]: string | undefined; // As per ts-sdp undefined is considered as a valid value to be used for codec parameters\n }\n ): Promise<void> {\n // These codec parameter changes underneath are SDP value changes that are taken care by WCME automatically. So no need for any change in streams from the web sdk side\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n await slot.setCodecParameters(codecParameters);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->setCodecParameters#Set codec parameters for ${mediaType} to ${codecParameters}`\n );\n }\n\n /**\n * This method is used to delete the codec parameters for the sendSlot of the given mediaType\n * @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be deleted (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {Array<String>} parameters Array of keys of the codec parameters to be deleted\n * @returns {Promise<void>}\n */\n public async deleteCodecParameters(mediaType: MediaType, parameters: string[]): Promise<void> {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n await slot.deleteCodecParameters(parameters);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->deleteCodecParameters#Deleted the following codec parameters -> ${parameters} for ${mediaType}`\n );\n }\n\n /**\n * This method is used to reset the SendSlotsManager by deleting all the sendSlots\n * @returns {undefined}\n */\n public reset(): void {\n this.slots.clear();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AAMoC,IAEfC,eAAe,GAAAC,OAAA,CAAAC,OAAA;EAIlC,SAAAF,gBAAYG,WAAgB,EAAE;IAAA,IAAAC,gBAAA,CAAAF,OAAA,QAAAF,eAAA;IAAA,IAAAK,gBAAA,CAAAH,OAAA,iBAHqB,IAAAI,IAAA,CAAAJ,OAAA,CAAQ,CAAC;IAAA,IAAAG,gBAAA,CAAAH,OAAA;IAI1D,IAAI,CAACC,WAAW,GAAGA,WAAW;EAChC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C;EAAA,OAAA1E,eAAA;AAAA"}
1
+ {"version":3,"names":["_internalMediaCore","require","SendSlotManager","exports","default","LoggerProxy","_classCallCheck2","_defineProperty2","_map","_createClass2","key","value","createSlot","mediaConnection","mediaType","active","arguments","length","undefined","slots","has","Error","concat","slot","createSendSlot","set","logger","info","getSlot","get","setNamedMediaGroups","namedMediaGroups","MediaType","AudioMain","setSourceStateOverride","state","VideoMain","clearSourceStateOverride","_publishStream","_asyncToGenerator2","_regenerator","mark","_callee","stream","wrap","_callee$","_context","prev","next","publishStream","label","muted","stop","_x","_x2","apply","_unpublishStream","_callee2","_callee2$","_context2","unpublishStream","_x3","setActive","_setCodecParameters","_callee3","codecParameters","_callee3$","_context3","setCodecParameters","_x4","_x5","_deleteCodecParameters","_callee4","parameters","_callee4$","_context4","deleteCodecParameters","_x6","_x7","reset","clear"],"sources":["sendSlotManager.ts"],"sourcesContent":["import {\n SendSlot,\n MediaType,\n LocalStream,\n MultistreamRoapMediaConnection,\n NamedMediaGroup,\n StreamState,\n} from '@webex/internal-media-core';\n\nexport default class SendSlotManager {\n private readonly slots: Map<MediaType, SendSlot> = new Map();\n private readonly LoggerProxy: any;\n\n constructor(LoggerProxy: any) {\n this.LoggerProxy = LoggerProxy;\n }\n\n /**\n * This method is used to create a sendSlot for the given mediaType and returns the created sendSlot\n * @param {MultistreamRoapMediaConnection} mediaConnection MultistreamRoapMediaConnection for which a sendSlot needs to be created\n * @param {MediaType} mediaType MediaType for which a sendSlot needs to be created (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {boolean} active This is optional boolean to set the active state of the sendSlot. Default is true\n * @returns {SendSlot} slot The created sendSlot\n */\n public createSlot(\n mediaConnection: MultistreamRoapMediaConnection,\n mediaType: MediaType,\n active = true\n ): SendSlot {\n if (this.slots.has(mediaType)) {\n throw new Error(`Slot for ${mediaType} already exists`);\n }\n\n const slot: SendSlot = mediaConnection.createSendSlot(mediaType, active);\n\n this.slots.set(mediaType, slot);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->createSlot#Created slot for ${mediaType} with active ${active}`\n );\n\n return slot;\n }\n\n /**\n * This method is used to retrieve the sendSlot for the given mediaType\n * @param {MediaType} mediaType of which the slot needs to be retrieved\n * @returns {SendSlot}\n */\n public getSlot(mediaType: MediaType): SendSlot {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n return slot;\n }\n\n /**\n * Allow users to specify 'namedMediaGroups' to indicate which named media group its audio should be sent to.\n * @param {MediaType} mediaType MediaType of the sendSlot to which the audio stream needs to be send to the media group\n * @param {[]}namedMediaGroups - Allow users to specify 'namedMediaGroups'.If the value of 'namedMediaGroups' is zero,\n * named media group will be canceled and the audio stream will be sent to the floor.\n * @returns {void}\n */\n public setNamedMediaGroups(mediaType: MediaType, namedMediaGroups: NamedMediaGroup[]) {\n if (mediaType !== MediaType.AudioMain) {\n throw new Error(\n `sendSlotManager cannot set named media group which media type is ${mediaType}`\n );\n }\n\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n slot.setNamedMediaGroups(namedMediaGroups);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->setNamedMediaGroups#set named media group ${namedMediaGroups}`\n );\n }\n\n /**\n * Sets the source state override for the given media type.\n * @param {MediaType} mediaType - The type of media (must be MediaType.VideoMain to apply source state changes).\n * @param {StreamState | null} state - The state to set or null to clear the override value.\n * @returns {void}\n */\n public setSourceStateOverride(mediaType: MediaType, state: StreamState | null) {\n if (mediaType !== MediaType.VideoMain) {\n throw new Error(\n `sendSlotManager cannot set source state override which media type is ${mediaType}`\n );\n }\n\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n if (state) {\n slot.setSourceStateOverride(state);\n } else {\n slot.clearSourceStateOverride();\n }\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->setSourceStateOverride#set source state override for ${mediaType} to ${state}`\n );\n }\n\n /**\n * This method publishes the given stream to the sendSlot for the given mediaType\n * @param {MediaType} mediaType MediaType of the sendSlot to which a stream needs to be published (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {LocalStream} stream LocalStream to be published\n * @returns {Promise<void>}\n */\n public async publishStream(mediaType: MediaType, stream: LocalStream): Promise<void> {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n await slot.publishStream(stream);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->publishStream#Published stream for ${mediaType} and stream with label ${stream.label} and muted ${stream.muted}`\n );\n }\n\n /**\n * This method unpublishes the stream from the sendSlot of the given mediaType\n * @param {MediaType} mediaType MediaType of the sendSlot from which a stream needs to be unpublished (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @returns {Promise<void>}\n */\n public async unpublishStream(mediaType: MediaType): Promise<void> {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n await slot.unpublishStream();\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->unpublishStream#Unpublished stream for ${mediaType}`\n );\n }\n\n /**\n * This method is used to set the active state of the sendSlot for the given mediaType\n * @param {MediaType} mediaType The MediaType of the sendSlot for which the active state needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {boolean} active The boolean to set the active state of the sendSlot. Default is true\n * @returns {void}\n */\n public setActive(mediaType: MediaType, active = true): void {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n slot.active = active;\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->setActive#Set active for ${mediaType} to ${active}`\n );\n }\n\n /**\n * This method is used to set the codec parameters for the sendSlot of the given mediaType\n * @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {Object} codecParameters\n * @returns {Promise<void>}\n */\n public async setCodecParameters(\n mediaType: MediaType,\n codecParameters: {\n [key: string]: string | undefined; // As per ts-sdp undefined is considered as a valid value to be used for codec parameters\n }\n ): Promise<void> {\n // These codec parameter changes underneath are SDP value changes that are taken care by WCME automatically. So no need for any change in streams from the web sdk side\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n await slot.setCodecParameters(codecParameters);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->setCodecParameters#Set codec parameters for ${mediaType} to ${codecParameters}`\n );\n }\n\n /**\n * This method is used to delete the codec parameters for the sendSlot of the given mediaType\n * @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be deleted (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {Array<String>} parameters Array of keys of the codec parameters to be deleted\n * @returns {Promise<void>}\n */\n public async deleteCodecParameters(mediaType: MediaType, parameters: string[]): Promise<void> {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n await slot.deleteCodecParameters(parameters);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->deleteCodecParameters#Deleted the following codec parameters -> ${parameters} for ${mediaType}`\n );\n }\n\n /**\n * This method is used to reset the SendSlotsManager by deleting all the sendSlots\n * @returns {undefined}\n */\n public reset(): void {\n this.slots.clear();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AAOoC,IAEfC,eAAe,GAAAC,OAAA,CAAAC,OAAA;EAIlC,SAAAF,gBAAYG,WAAgB,EAAE;IAAA,IAAAC,gBAAA,CAAAF,OAAA,QAAAF,eAAA;IAAA,IAAAK,gBAAA,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A5B,IAAA,GAAA4B,SAAA,CAAA3B,IAAA;YAAA;cACrEzB,IAAI,GAAG,IAAI,CAACJ,KAAK,CAACU,GAAG,CAACf,SAAS,CAAC;cAAA,IAEjCS,IAAI;gBAAAoD,SAAA,CAAA3B,IAAA;gBAAA;cAAA;cAAA,MACD,IAAI3B,KAAK,aAAAC,MAAA,CAAaR,SAAS,oBAAiB,CAAC;YAAA;cAAA6D,SAAA,CAAA3B,IAAA;cAAA,OAGnDzB,IAAI,CAACqD,qBAAqB,CAACH,UAAU,CAAC;YAAA;cAE5C,IAAI,CAACpE,WAAW,CAACqB,MAAM,CAACC,IAAI,sFAAAL,MAAA,CAC2DmD,UAAU,WAAAnD,MAAA,CAAQR,SAAS,CAClH,CAAC;YAAC;YAAA;cAAA,OAAA6D,SAAA,CAAAvB,IAAA;UAAA;QAAA,GAAAoB,QAAA;MAAA,CACH;MAAA,SAAAI,sBAAAC,GAAA,EAAAC,GAAA;QAAA,OAAAP,sBAAA,CAAAhB,KAAA,OAAAvC,SAAA;MAAA;MAAA,OAAA4D,qBAAA;IAAA;IAED;AACF;AACA;AACA;IAHE;EAAA;IAAAlE,GAAA;IAAAC,KAAA,EAIA,SAAAoE,MAAA,EAAqB;MACnB,IAAI,CAAC5D,KAAK,CAAC6D,KAAK,CAAC,CAAC;IACpB;EAAC;EAAA,OAAA9E,eAAA;AAAA"}
@@ -216,6 +216,7 @@ export declare const EVENT_TRIGGERS: {
216
216
  MEETING_SELF_CANNOT_VIEW_PARTICIPANT_LIST: string;
217
217
  MEETING_SELF_IS_SHARING_BLOCKED: string;
218
218
  MEETING_SELF_ROLES_CHANGED: string;
219
+ MEETING_SELF_BRB_UPDATE: string;
219
220
  MEETING_CONTROLS_LAYOUT_UPDATE: string;
220
221
  MEETING_ENTRY_EXIT_TONE_UPDATE: string;
221
222
  MEETING_BREAKOUTS_UPDATE: string;
@@ -587,6 +588,7 @@ export declare const LOCUSINFO: {
587
588
  SELF_IS_SHARING_BLOCKED_CHANGE: string;
588
589
  SELF_MEETING_BREAKOUTS_CHANGED: string;
589
590
  SELF_MEETING_INTERPRETATION_CHANGED: string;
591
+ SELF_MEETING_BRB_CHANGED: string;
590
592
  MEDIA_INACTIVITY: string;
591
593
  LINKS_SERVICES: string;
592
594
  LINKS_RESOURCES: string;
@@ -837,6 +837,14 @@ export default class Meeting extends StatelessWebexPlugin {
837
837
  authorizingLocusUrl: string;
838
838
  mainLocusUrl: string;
839
839
  }): any;
840
+ /**
841
+ * Manages be right back status updates for the current participant.
842
+ *
843
+ * @param {boolean} enabled - Indicates whether the user enabled brb or not.
844
+ * @returns {Promise<void>} resolves when the brb status is updated or does nothing if not in a multistream meeting.
845
+ * @throws {Error} - Throws an error if the request fails.
846
+ */
847
+ beRightBack(enabled: boolean): Promise<void>;
840
848
  /**
841
849
  * Remove the member from the meeting, boot them
842
850
  * @param {String} memberId
@@ -1,5 +1,5 @@
1
1
  import { StatelessWebexPlugin } from '@webex/webex-core';
2
- import { SendReactionOptions, ToggleReactionsOptions } from './request.type';
2
+ import { SendReactionOptions, BrbOptions, ToggleReactionsOptions } from './request.type';
3
3
  import { AnnotationInfo } from '../annotation/annotation.types';
4
4
  import { ClientMediaPreferences } from '../reachability/reachability.types';
5
5
  /**
@@ -292,4 +292,15 @@ export default class MeetingRequest extends StatelessWebexPlugin {
292
292
  */
293
293
  toggleReactions({ enable, locusUrl, requestingParticipantId }: ToggleReactionsOptions): Promise<any>;
294
294
  getLocusStatusByUrl(locusUrl: string): any;
295
+ /**
296
+ * Sends a request to set be right back status.
297
+ *
298
+ * @param {Object} options - The options for brb request.
299
+ * @param {boolean} options.enabled - Whether brb status is enabled.
300
+ * @param {string} options.locusUrl - The URL of the locus.
301
+ * @param {string} options.deviceUrl - The URL of the device.
302
+ * @param {string} options.selfId - The ID of the participant.
303
+ * @returns {Promise}
304
+ */
305
+ setBrb({ enabled, locusUrl, deviceUrl, selfId }: BrbOptions): Promise<any>;
295
306
  }
@@ -9,3 +9,9 @@ export type ToggleReactionsOptions = {
9
9
  locusUrl: string;
10
10
  requestingParticipantId: string;
11
11
  };
12
+ export type BrbOptions = {
13
+ enabled: boolean;
14
+ locusUrl: string;
15
+ deviceUrl: string;
16
+ selfId: string;
17
+ };
@@ -21,6 +21,7 @@ export default class Member {
21
21
  isRecording: any;
22
22
  isRemovable: any;
23
23
  isSelf: any;
24
+ isBrb: boolean;
24
25
  isUser: any;
25
26
  isVideoMuted: any;
26
27
  roles: IExternalRoles;
@@ -19,6 +19,13 @@ export type ParticipantWithRoles = {
19
19
  };
20
20
  };
21
21
  };
22
+ export type ParticipantWithBrb = {
23
+ controls: {
24
+ brb?: {
25
+ enabled: boolean;
26
+ };
27
+ };
28
+ };
22
29
  export declare enum MediaStatus {
23
30
  RECVONLY = "RECVONLY",
24
31
  SENDONLY = "SENDONLY",
@@ -1,4 +1,4 @@
1
- import { SendSlot, MediaType, LocalStream, MultistreamRoapMediaConnection, NamedMediaGroup } from '@webex/internal-media-core';
1
+ import { SendSlot, MediaType, LocalStream, MultistreamRoapMediaConnection, NamedMediaGroup, StreamState } from '@webex/internal-media-core';
2
2
  export default class SendSlotManager {
3
3
  private readonly slots;
4
4
  private readonly LoggerProxy;
@@ -25,6 +25,13 @@ export default class SendSlotManager {
25
25
  * @returns {void}
26
26
  */
27
27
  setNamedMediaGroups(mediaType: MediaType, namedMediaGroups: NamedMediaGroup[]): void;
28
+ /**
29
+ * Sets the source state override for the given media type.
30
+ * @param {MediaType} mediaType - The type of media (must be MediaType.VideoMain to apply source state changes).
31
+ * @param {StreamState | null} state - The state to set or null to clear the override value.
32
+ * @returns {void}
33
+ */
34
+ setSourceStateOverride(mediaType: MediaType, state: StreamState | null): void;
28
35
  /**
29
36
  * This method publishes the given stream to the sendSlot for the given mediaType
30
37
  * @param {MediaType} mediaType MediaType of the sendSlot to which a stream needs to be published (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
@@ -458,7 +458,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
458
458
  }, _callee7);
459
459
  }))();
460
460
  },
461
- version: "3.7.0-next.21"
461
+ version: "3.7.0-next.23"
462
462
  });
463
463
  var _default = exports.default = Webinar;
464
464
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -43,7 +43,7 @@
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.7.0-next.21",
46
+ "@webex/plugin-meetings": "3.7.0-next.23",
47
47
  "@webex/plugin-rooms": "3.7.0-next.7",
48
48
  "@webex/test-helper-chai": "3.7.0-next.5",
49
49
  "@webex/test-helper-mocha": "3.7.0-next.5",
@@ -70,7 +70,7 @@
70
70
  "@webex/internal-plugin-metrics": "3.7.0-next.5",
71
71
  "@webex/internal-plugin-support": "3.7.0-next.8",
72
72
  "@webex/internal-plugin-user": "3.7.0-next.5",
73
- "@webex/internal-plugin-voicea": "3.7.0-next.21",
73
+ "@webex/internal-plugin-voicea": "3.7.0-next.23",
74
74
  "@webex/media-helpers": "3.7.0-next.6",
75
75
  "@webex/plugin-people": "3.7.0-next.5",
76
76
  "@webex/plugin-rooms": "3.7.0-next.7",
@@ -91,5 +91,5 @@
91
91
  "//": [
92
92
  "TODO: upgrade jwt-decode when moving to node 18"
93
93
  ],
94
- "version": "3.7.0-next.21"
94
+ "version": "3.7.0-next.23"
95
95
  }
package/src/constants.ts CHANGED
@@ -305,6 +305,7 @@ export const EVENT_TRIGGERS = {
305
305
  MEETING_SELF_CANNOT_VIEW_PARTICIPANT_LIST: 'meeting:self:cannotViewParticipantList',
306
306
  MEETING_SELF_IS_SHARING_BLOCKED: 'meeting:self:isSharingBlocked',
307
307
  MEETING_SELF_ROLES_CHANGED: 'meeting:self:rolesChanged',
308
+ MEETING_SELF_BRB_UPDATE: 'meeting:self:brbUpdate',
308
309
  MEETING_CONTROLS_LAYOUT_UPDATE: 'meeting:layout:update',
309
310
  MEETING_ENTRY_EXIT_TONE_UPDATE: 'meeting:entryExitTone:update',
310
311
  MEETING_BREAKOUTS_UPDATE: 'meeting:breakouts:update',
@@ -719,6 +720,7 @@ export const LOCUSINFO = {
719
720
  SELF_IS_SHARING_BLOCKED_CHANGE: 'SELF_IS_SHARING_BLOCKED_CHANGE',
720
721
  SELF_MEETING_BREAKOUTS_CHANGED: 'SELF_MEETING_BREAKOUTS_CHANGED',
721
722
  SELF_MEETING_INTERPRETATION_CHANGED: 'SELF_MEETING_INTERPRETATION_CHANGED',
723
+ SELF_MEETING_BRB_CHANGED: 'SELF_MEETING_BRB_CHANGED',
722
724
  MEDIA_INACTIVITY: 'MEDIA_INACTIVITY',
723
725
  LINKS_SERVICES: 'LINKS_SERVICES',
724
726
  LINKS_RESOURCES: 'LINKS_RESOURCES',
@@ -1395,6 +1395,19 @@ export default class LocusInfo extends EventsScope {
1395
1395
  );
1396
1396
  }
1397
1397
 
1398
+ if (parsedSelves.updates.brbChanged) {
1399
+ this.emitScoped(
1400
+ {
1401
+ file: 'locus-info',
1402
+ function: 'updateSelf',
1403
+ },
1404
+ LOCUSINFO.EVENTS.SELF_MEETING_BRB_CHANGED,
1405
+ {
1406
+ brb: parsedSelves.current.brb,
1407
+ }
1408
+ );
1409
+ }
1410
+
1398
1411
  if (parsedSelves.updates.interpretationChanged) {
1399
1412
  this.emitScoped(
1400
1413
  {