@webex/plugin-meetings 3.8.1-next.30 → 3.8.1-next.32

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.
@@ -16,7 +16,6 @@ export default class LocusInfo extends EventsScope {
16
16
  aclUrl: any;
17
17
  baseSequence: any;
18
18
  created: any;
19
- deltaParticipants: any;
20
19
  identities: any;
21
20
  membership: any;
22
21
  participants: any;
@@ -148,14 +147,6 @@ export default class LocusInfo extends EventsScope {
148
147
  * @memberof LocusInfo
149
148
  */
150
149
  compareSelfAndHost(): void;
151
- /**
152
- * Update the deltaParticipants property of this object based on a list of
153
- * provided participants.
154
- *
155
- * @param {Array} [participants] - The participants to update against.
156
- * @returns {void}
157
- */
158
- updateParticipantDeltas(participants?: Array<any>): void;
159
150
  /**
160
151
  * update meeting's members
161
152
  * @param {Object} participants new participants object
@@ -458,7 +458,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
458
458
  }, _callee7);
459
459
  }))();
460
460
  },
461
- version: "3.8.1-next.30"
461
+ version: "3.8.1-next.32"
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.8.1-next.30",
46
+ "@webex/plugin-meetings": "3.8.1-next.32",
47
47
  "@webex/plugin-rooms": "3.8.1-next.7",
48
48
  "@webex/test-helper-chai": "3.8.1-next.10",
49
49
  "@webex/test-helper-mocha": "3.8.1-next.10",
@@ -71,7 +71,7 @@
71
71
  "@webex/internal-plugin-metrics": "3.8.1-next.10",
72
72
  "@webex/internal-plugin-support": "3.8.1-next.10",
73
73
  "@webex/internal-plugin-user": "3.8.1-next.10",
74
- "@webex/internal-plugin-voicea": "3.8.1-next.30",
74
+ "@webex/internal-plugin-voicea": "3.8.1-next.32",
75
75
  "@webex/media-helpers": "3.8.1-next.14",
76
76
  "@webex/plugin-people": "3.8.1-next.10",
77
77
  "@webex/plugin-rooms": "3.8.1-next.7",
@@ -93,5 +93,5 @@
93
93
  "//": [
94
94
  "TODO: upgrade jwt-decode when moving to node 18"
95
95
  ],
96
- "version": "3.8.1-next.30"
96
+ "version": "3.8.1-next.32"
97
97
  }
@@ -48,7 +48,6 @@ export default class LocusInfo extends EventsScope {
48
48
  aclUrl: any;
49
49
  baseSequence: any;
50
50
  created: any;
51
- deltaParticipants: any;
52
51
  identities: any;
53
52
  membership: any;
54
53
  participants: any;
@@ -284,17 +283,6 @@ export default class LocusInfo extends EventsScope {
284
283
  * @property {Object} person - Contains person data.
285
284
  */
286
285
 
287
- /**
288
- * Stored participant changes between the last event and the current event.
289
- * All previously stored events are overwritten between events.
290
- *
291
- * @instance
292
- * @type {Array<DeltaParticipant>}
293
- * @private
294
- * @member LocusInfo
295
- */
296
- this.deltaParticipants = [];
297
-
298
286
  this.updateLocusCache(locus);
299
287
  // above section only updates the locusInfo object
300
288
  // The below section makes sure it updates the locusInfo as well as updates the meeting object
@@ -400,7 +388,6 @@ export default class LocusInfo extends EventsScope {
400
388
  return;
401
389
  }
402
390
 
403
- this.updateParticipantDeltas(locus.participants);
404
391
  this.scheduledMeeting = locus.meeting || null;
405
392
  this.participants = locus.participants;
406
393
  const isReplaceMembers = ControlsUtils.isNeedReplaceMembers(this.controls, locus.controls);
@@ -755,55 +742,6 @@ export default class LocusInfo extends EventsScope {
755
742
  }
756
743
  }
757
744
 
758
- /**
759
- * Update the deltaParticipants property of this object based on a list of
760
- * provided participants.
761
- *
762
- * @param {Array} [participants] - The participants to update against.
763
- * @returns {void}
764
- */
765
- updateParticipantDeltas(participants: Array<any> = []) {
766
- // Used to find a participant within a participants collection.
767
- const findParticipant = (participant, collection) =>
768
- collection.find((item) => item.person.id === participant.person.id);
769
-
770
- // Generates an object that indicates which state properties have changed.
771
- const generateDelta = (prevState: any = {}, newState: any = {}) => {
772
- // Setup deltas.
773
- const deltas = {
774
- audioStatus: prevState.audioStatus !== newState.audioStatus,
775
- videoSlidesStatus: prevState.videoSlidesStatus !== newState.videoSlidesStatus,
776
- videoStatus: prevState.videoStatus !== newState.videoStatus,
777
- };
778
-
779
- // Clean the object
780
- Object.keys(deltas).forEach((key) => {
781
- if (deltas[key] !== true) {
782
- delete deltas[key];
783
- }
784
- });
785
-
786
- return deltas;
787
- };
788
-
789
- this.deltaParticipants = participants.reduce((collection, participant) => {
790
- const existingParticipant = findParticipant(participant, this.participants || []) || {};
791
-
792
- const delta = generateDelta(existingParticipant.status, participant.status);
793
-
794
- const changed = Object.keys(delta).length > 0;
795
-
796
- if (changed) {
797
- collection.push({
798
- person: participant.person,
799
- delta,
800
- });
801
- }
802
-
803
- return collection;
804
- }, []);
805
- }
806
-
807
745
  /**
808
746
  * update meeting's members
809
747
  * @param {Object} participants new participants object
@@ -3064,12 +3064,16 @@ export default class Meeting extends StatelessWebexPlugin {
3064
3064
  // There is no concept of local/remote share for whiteboard
3065
3065
  // It does not matter who requested to share the whiteboard, everyone gets the same view
3066
3066
  else if (whiteboardShare.disposition === FLOOR_ACTION.GRANTED) {
3067
- // WHITEBOARD - sharing whiteboard
3068
- // Webinar attendee should receive whiteboard as remote share
3069
- newShareStatus =
3070
- this.locusInfo?.info?.isWebinar && this.webinar?.selfIsAttendee
3071
- ? SHARE_STATUS.REMOTE_SHARE_ACTIVE
3072
- : SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE;
3067
+ if (this.locusInfo?.info?.isWebinar && this.webinar?.selfIsAttendee) {
3068
+ // WHITEBOARD - sharing whiteboard
3069
+ // Webinar attendee should receive whiteboard as remote share
3070
+ newShareStatus = SHARE_STATUS.REMOTE_SHARE_ACTIVE;
3071
+ } else if (this.guest) {
3072
+ // If user is a guest to a meeting, they should receive whiteboard as remote share
3073
+ newShareStatus = SHARE_STATUS.REMOTE_SHARE_ACTIVE;
3074
+ } else {
3075
+ newShareStatus = SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE;
3076
+ }
3073
3077
  }
3074
3078
  // or if content share is either released or null and whiteboard share is either released or null, no one is sharing
3075
3079
  else if (
@@ -834,39 +834,6 @@ describe('plugin-meetings', () => {
834
834
  );
835
835
  });
836
836
 
837
- it('should update the deltaParticipants object', () => {
838
- const prev = locusInfo.deltaParticipants;
839
-
840
- locusInfo.updateParticipantDeltas(newParticipants);
841
-
842
- assert.notEqual(locusInfo.deltaParticipants, prev);
843
- });
844
-
845
- it('should update the delta property on all changed states', () => {
846
- locusInfo.updateParticipantDeltas(newParticipants);
847
-
848
- const [exampleParticipant] = locusInfo.deltaParticipants;
849
-
850
- assert.isTrue(exampleParticipant.delta.audioStatus);
851
- assert.isTrue(exampleParticipant.delta.videoSlidesStatus);
852
- assert.isTrue(exampleParticipant.delta.videoStatus);
853
- });
854
-
855
- it('should include the person details of the changed participant', () => {
856
- locusInfo.updateParticipantDeltas(newParticipants);
857
-
858
- const [exampleParticipant] = locusInfo.deltaParticipants;
859
-
860
- assert.equal(exampleParticipant.person, newParticipants[0].person);
861
- });
862
-
863
- it('should clear deltaParticipants when no changes occured', () => {
864
- locusInfo.participants = [...newParticipants];
865
-
866
- locusInfo.updateParticipantDeltas(locusInfo.participants);
867
-
868
- assert.isTrue(locusInfo.deltaParticipants.length === 0);
869
- });
870
837
 
871
838
  it('should call with participant display name', () => {
872
839
  const failureParticipant = [
@@ -2196,7 +2163,6 @@ describe('plugin-meetings', () => {
2196
2163
  it('onFullLocus() updates the working-copy of locus parser', () => {
2197
2164
  const eventType = 'fakeEvent';
2198
2165
 
2199
- sandbox.stub(locusInfo, 'updateParticipantDeltas');
2200
2166
  sandbox.stub(locusInfo, 'updateLocusInfo');
2201
2167
  sandbox.stub(locusInfo, 'updateParticipants');
2202
2168
  sandbox.stub(locusInfo, 'isMeetingActive');
@@ -2216,7 +2182,6 @@ describe('plugin-meetings', () => {
2216
2182
  const oldWorkingCopy = locusParser.workingCopy;
2217
2183
 
2218
2184
  const spies = [
2219
- sandbox.stub(locusInfo, 'updateParticipantDeltas'),
2220
2185
  sandbox.stub(locusInfo, 'updateLocusInfo'),
2221
2186
  sandbox.stub(locusInfo, 'updateParticipants'),
2222
2187
  sandbox.stub(locusInfo, 'isMeetingActive'),
@@ -3064,7 +3029,6 @@ describe('plugin-meetings', () => {
3064
3029
  beforeEach(() => {
3065
3030
  clock = sinon.useFakeTimers();
3066
3031
 
3067
- sinon.stub(locusInfo, 'updateParticipantDeltas');
3068
3032
  sinon.stub(locusInfo, 'updateParticipants');
3069
3033
  sinon.stub(locusInfo, 'isMeetingActive');
3070
3034
  sinon.stub(locusInfo, 'handleOneOnOneEvent');
@@ -12433,7 +12433,7 @@ describe('plugin-meetings', () => {
12433
12433
  activeSharingId.whiteboard = beneficiaryId;
12434
12434
 
12435
12435
  eventTrigger.share.push(
12436
- meeting.webinar.selfIsAttendee
12436
+ meeting.webinar.selfIsAttendee || meeting.guest
12437
12437
  ? {
12438
12438
  eventName: EVENT_TRIGGERS.MEETING_STARTED_SHARING_REMOTE,
12439
12439
  functionName: 'remoteShare',
@@ -12452,7 +12452,8 @@ describe('plugin-meetings', () => {
12452
12452
  }
12453
12453
  );
12454
12454
 
12455
- shareStatus = meeting.webinar.selfIsAttendee
12455
+ shareStatus =
12456
+ meeting.webinar.selfIsAttendee || meeting.guest
12456
12457
  ? SHARE_STATUS.REMOTE_SHARE_ACTIVE
12457
12458
  : SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE;
12458
12459
  }
@@ -12670,6 +12671,36 @@ describe('plugin-meetings', () => {
12670
12671
  });
12671
12672
  });
12672
12673
 
12674
+ describe('Whiteboard Share - User is guest', () => {
12675
+ it('User receives a remote share instead of whiteboard share', () => {
12676
+ // Set the guest flag
12677
+ meeting.guest = true;
12678
+
12679
+ // Step 1: Start sharing whiteboard A
12680
+ const data1 = generateData(
12681
+ blankPayload, // Initial payload
12682
+ true, // isGranting: Granting share
12683
+ false, // isContent: Whiteboard (not content)
12684
+ USER_IDS.REMOTE_A, // Beneficiary ID: Remote user A
12685
+ RESOURCE_URLS.WHITEBOARD_A // Resource URL: Whiteboard A
12686
+ );
12687
+
12688
+ // Step 2: Stop sharing whiteboard A
12689
+ const data2 = generateData(
12690
+ data1.payload, // Updated payload from Step 1
12691
+ false, // isGranting: Stopping share
12692
+ false, // isContent: Whiteboard
12693
+ USER_IDS.REMOTE_A // Beneficiary ID: Remote user A
12694
+ );
12695
+
12696
+ // Validate the payload changes and status updates
12697
+ payloadTestHelper([data1]);
12698
+
12699
+ // Specific assertions for guest
12700
+ assert.equal(meeting.shareStatus, SHARE_STATUS.REMOTE_SHARE_ACTIVE);
12701
+ });
12702
+ });
12703
+
12673
12704
  describe('Whiteboard A --> Whiteboard B', () => {
12674
12705
  it('Scenario #1: you share both whiteboards', () => {
12675
12706
  const data1 = generateData(