@webex/plugin-meetings 3.0.0-beta.147 → 3.0.0-beta.148

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.
@@ -582,6 +582,13 @@ export default class Meeting extends StatelessWebexPlugin {
582
582
  * @memberof Meeting
583
583
  */
584
584
  private setupLocusControlsListener;
585
+ /**
586
+ * Trigger annotation info update event
587
+ @returns {undefined}
588
+ @param {object} contentShare
589
+ @param {object} previousContentShare
590
+ */
591
+ private triggerAnnotationInfoEvent;
585
592
  /**
586
593
  * Set up the locus info media shares listener
587
594
  * update content and whiteboard sharing id value for members, and updates the member
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webex/plugin-meetings",
3
- "version": "3.0.0-beta.147",
3
+ "version": "3.0.0-beta.148",
4
4
  "description": "",
5
5
  "license": "Cisco EULA (https://www.cisco.com/c/en/us/products/end-user-license-agreement.html)",
6
6
  "contributors": [
@@ -32,12 +32,12 @@
32
32
  "build": "yarn run -T tsc --declaration true --declarationDir ./dist/types"
33
33
  },
34
34
  "devDependencies": {
35
- "@webex/plugin-meetings": "3.0.0-beta.147",
36
- "@webex/test-helper-chai": "3.0.0-beta.147",
37
- "@webex/test-helper-mocha": "3.0.0-beta.147",
38
- "@webex/test-helper-mock-webex": "3.0.0-beta.147",
39
- "@webex/test-helper-retry": "3.0.0-beta.147",
40
- "@webex/test-helper-test-users": "3.0.0-beta.147",
35
+ "@webex/plugin-meetings": "3.0.0-beta.148",
36
+ "@webex/test-helper-chai": "3.0.0-beta.148",
37
+ "@webex/test-helper-mocha": "3.0.0-beta.148",
38
+ "@webex/test-helper-mock-webex": "3.0.0-beta.148",
39
+ "@webex/test-helper-retry": "3.0.0-beta.148",
40
+ "@webex/test-helper-test-users": "3.0.0-beta.148",
41
41
  "chai": "^4.3.4",
42
42
  "chai-as-promised": "^7.1.1",
43
43
  "jsdom-global": "3.0.2",
@@ -46,19 +46,19 @@
46
46
  "typescript": "^4.7.4"
47
47
  },
48
48
  "dependencies": {
49
- "@webex/common": "3.0.0-beta.147",
49
+ "@webex/common": "3.0.0-beta.148",
50
50
  "@webex/internal-media-core": "1.38.3",
51
- "@webex/internal-plugin-conversation": "3.0.0-beta.147",
52
- "@webex/internal-plugin-device": "3.0.0-beta.147",
53
- "@webex/internal-plugin-llm": "3.0.0-beta.147",
54
- "@webex/internal-plugin-mercury": "3.0.0-beta.147",
55
- "@webex/internal-plugin-metrics": "3.0.0-beta.147",
56
- "@webex/internal-plugin-support": "3.0.0-beta.147",
57
- "@webex/internal-plugin-user": "3.0.0-beta.147",
58
- "@webex/media-helpers": "3.0.0-beta.147",
59
- "@webex/plugin-people": "3.0.0-beta.147",
60
- "@webex/plugin-rooms": "3.0.0-beta.147",
61
- "@webex/webex-core": "3.0.0-beta.147",
51
+ "@webex/internal-plugin-conversation": "3.0.0-beta.148",
52
+ "@webex/internal-plugin-device": "3.0.0-beta.148",
53
+ "@webex/internal-plugin-llm": "3.0.0-beta.148",
54
+ "@webex/internal-plugin-mercury": "3.0.0-beta.148",
55
+ "@webex/internal-plugin-metrics": "3.0.0-beta.148",
56
+ "@webex/internal-plugin-support": "3.0.0-beta.148",
57
+ "@webex/internal-plugin-user": "3.0.0-beta.148",
58
+ "@webex/media-helpers": "3.0.0-beta.148",
59
+ "@webex/plugin-people": "3.0.0-beta.148",
60
+ "@webex/plugin-rooms": "3.0.0-beta.148",
61
+ "@webex/webex-core": "3.0.0-beta.148",
62
62
  "ampersand-collection": "^2.0.2",
63
63
  "bowser": "^2.11.0",
64
64
  "btoa": "^1.2.1",
@@ -85,7 +85,6 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
85
85
  payload: e.data.approval,
86
86
  }
87
87
  );
88
- this.seqNum = (e?.sequenceNumber || 0) + 1;
89
88
  }
90
89
  }
91
90
 
@@ -96,7 +95,6 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
96
95
  private eventDataProcessor(e) {
97
96
  switch (e?.data?.relayType) {
98
97
  case ANNOTATION_RELAY_TYPES.ANNOTATION_CLIENT:
99
- this.seqNum = (e?.sequenceNumber || 0) + 1;
100
98
  this.processStrokeMessage(e.data);
101
99
  break;
102
100
  default:
@@ -2200,6 +2200,29 @@ export default class Meeting extends StatelessWebexPlugin {
2200
2200
  });
2201
2201
  }
2202
2202
 
2203
+ /**
2204
+ * Trigger annotation info update event
2205
+ @returns {undefined}
2206
+ @param {object} contentShare
2207
+ @param {object} previousContentShare
2208
+ */
2209
+ private triggerAnnotationInfoEvent(contentShare, previousContentShare) {
2210
+ if (
2211
+ contentShare?.annotation &&
2212
+ !isEqual(contentShare?.annotation, previousContentShare?.annotation)
2213
+ ) {
2214
+ Trigger.trigger(
2215
+ this,
2216
+ {
2217
+ file: 'meeting/index',
2218
+ function: 'triggerAnnotationInfoEvent',
2219
+ },
2220
+ EVENT_TRIGGERS.MEETING_UPDATE_ANNOTATION_INFO,
2221
+ contentShare.annotation
2222
+ );
2223
+ }
2224
+ }
2225
+
2203
2226
  /**
2204
2227
  * Set up the locus info media shares listener
2205
2228
  * update content and whiteboard sharing id value for members, and updates the member
@@ -2215,17 +2238,7 @@ export default class Meeting extends StatelessWebexPlugin {
2215
2238
  const previousContentShare = payload.previous?.content;
2216
2239
  const previousWhiteboardShare = payload.previous?.whiteboard;
2217
2240
 
2218
- if (!isEqual(contentShare?.annotation, previousContentShare?.annotation)) {
2219
- Trigger.trigger(
2220
- this,
2221
- {
2222
- file: 'meetings/index',
2223
- function: 'remoteShare',
2224
- },
2225
- EVENT_TRIGGERS.MEETING_UPDATE_ANNOTATION_INFO,
2226
- contentShare.annotation
2227
- );
2228
- }
2241
+ this.triggerAnnotationInfoEvent(contentShare, previousContentShare);
2229
2242
 
2230
2243
  if (
2231
2244
  contentShare.beneficiaryId === previousContentShare?.beneficiaryId &&
@@ -189,7 +189,7 @@ describe('live-annotation', () => {
189
189
  });
190
190
 
191
191
 
192
- describe('encrypt/decrypt Content ', () => {
192
+ describe('encrypt/decrypt Content', () => {
193
193
  beforeEach(async () => {
194
194
  annotationService.webex.internal.encryption.encryptText = sinon.stub().returns(Promise.resolve('RETURN_VALUE'));
195
195
  annotationService.webex.internal.encryption.decryptText = sinon.stub().returns(Promise.resolve('RETURN_VALUE'));
@@ -201,7 +201,7 @@ describe('live-annotation', () => {
201
201
  assert.equal(result, 'RETURN_VALUE')
202
202
  });
203
203
 
204
- it('decryptContent ', async() => {
204
+ it('decryptContent', async() => {
205
205
  const result = await annotationService.decryptContent("decryptionKeyUrl", "content");
206
206
  assert.calledOnceWithExactly(webex.internal.encryption.decryptText, "decryptionKeyUrl", "content");
207
207
  assert.equal(result, 'RETURN_VALUE')
@@ -232,7 +232,7 @@ describe('live-annotation', () => {
232
232
  });
233
233
 
234
234
 
235
- it('works on publish Stroke Data', async () => {
235
+ it('works on publish Stroke Data', async () => {
236
236
  const strokeData = {
237
237
  content: {
238
238
  "contentsBuffer": [{
@@ -343,7 +343,7 @@ describe('live-annotation', () => {
343
343
  });
344
344
  });
345
345
 
346
- describe('change annotation options', () => {
346
+ describe('change annotation info by presenter', () => {
347
347
  it('makes change annotation options as expected', async() => {
348
348
  const options = { annotationInfo:{
349
349
  version: '1',
@@ -5489,6 +5489,50 @@ describe('plugin-meetings', () => {
5489
5489
  });
5490
5490
  });
5491
5491
  describe('share scenarios', () => {
5492
+
5493
+ describe('triggerAnnotationInfoEvent', () => {
5494
+ it('check triggerAnnotationInfoEvent event', () => {
5495
+
5496
+ TriggerProxy.trigger.reset();
5497
+ const annotationInfo = {version: '1', policy: 'Approval'};
5498
+ meeting.triggerAnnotationInfoEvent({annotation:annotationInfo},{});
5499
+
5500
+ assert.calledWith(
5501
+ TriggerProxy.trigger,
5502
+ meeting,
5503
+ {
5504
+ file: 'meeting/index',
5505
+ function: 'triggerAnnotationInfoEvent',
5506
+ },
5507
+ 'meeting:updateAnnotationInfo',
5508
+ annotationInfo
5509
+ );
5510
+
5511
+ TriggerProxy.trigger.reset();
5512
+ meeting.triggerAnnotationInfoEvent({annotation:annotationInfo},{annotation:annotationInfo});
5513
+ assert.notCalled(TriggerProxy.trigger);
5514
+
5515
+ TriggerProxy.trigger.reset();
5516
+ const annotationInfoUpdated = {version: '1', policy: 'AnnotationNotAllowed'};
5517
+ meeting.triggerAnnotationInfoEvent({annotation:annotationInfoUpdated},{annotation:annotationInfo});
5518
+ assert.calledWith(
5519
+ TriggerProxy.trigger,
5520
+ meeting,
5521
+ {
5522
+ file: 'meeting/index',
5523
+ function: 'triggerAnnotationInfoEvent',
5524
+ },
5525
+ 'meeting:updateAnnotationInfo',
5526
+ annotationInfoUpdated
5527
+ );
5528
+
5529
+ TriggerProxy.trigger.reset();
5530
+ meeting.triggerAnnotationInfoEvent(null,{annotation:annotationInfoUpdated});
5531
+ assert.notCalled(TriggerProxy.trigger);
5532
+
5533
+ });
5534
+ });
5535
+
5492
5536
  describe('setUpLocusMediaSharesListener', () => {
5493
5537
  beforeEach(() => {
5494
5538
  meeting.selfId = '9528d952-e4de-46cf-8157-fd4823b98377';
@@ -6179,29 +6223,6 @@ describe('plugin-meetings', () => {
6179
6223
  payloadTestHelper([data1, data2, data3]);
6180
6224
  });
6181
6225
  });
6182
-
6183
- describe('annotation policy', () => {
6184
-
6185
- it('Scenario #1: blank annotation', () => {
6186
- const data1 = generateData(blankPayload, true, true, USER_IDS.ME);
6187
- const data2 = generateData(data1.payload, false, true, USER_IDS.ME);
6188
- const data3 = generateData(data2.payload, true, true, USER_IDS.ME);
6189
- const data4 = generateData(data3.payload, false, true, USER_IDS.ME);
6190
-
6191
- payloadTestHelper([data1, data2, data3, data4]);
6192
- });
6193
-
6194
- it('Scenario #2: annotation', () => {
6195
- const annotationInfo = {version: '1', policy: 'Approval'};
6196
- const data1 = generateData(blankPayload, true, true, USER_IDS.ME, annotationInfo);
6197
- const data2 = generateData(data1.payload, false, true, USER_IDS.ME);
6198
- const data3 = generateData(data2.payload, true, true, USER_IDS.ME);
6199
- const data4 = generateData(data3.payload, false, true, USER_IDS.ME);
6200
-
6201
- payloadTestHelper([data1, data2, data3, data4]);
6202
- });
6203
- });
6204
-
6205
6226
  describe('Desktop A --> Desktop B', () => {
6206
6227
  it('Scenario #1: you share desktop A and then share desktop B', () => {
6207
6228
  const data1 = generateData(blankPayload, true, true, USER_IDS.ME);