@webex/plugin-meetings 2.59.6 → 2.59.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webex/plugin-meetings",
3
- "version": "2.59.6",
3
+ "version": "2.59.8",
4
4
  "description": "",
5
5
  "license": "Cisco EULA (https://www.cisco.com/c/en/us/products/end-user-license-agreement.html)",
6
6
  "contributors": [
@@ -39,17 +39,17 @@
39
39
  "devDependencies": {
40
40
  "@babel/core": "^7.17.10",
41
41
  "@types/jsdom": "^21",
42
- "@webex/babel-config-legacy": "2.59.6",
43
- "@webex/eslint-config-legacy": "2.59.6",
44
- "@webex/jest-config-legacy": "2.59.6",
45
- "@webex/legacy-tools": "2.59.6",
46
- "@webex/plugin-meetings": "2.59.6",
47
- "@webex/plugin-rooms": "2.59.6",
48
- "@webex/test-helper-chai": "2.59.6",
49
- "@webex/test-helper-mocha": "2.59.6",
50
- "@webex/test-helper-mock-webex": "2.59.6",
51
- "@webex/test-helper-retry": "2.59.6",
52
- "@webex/test-helper-test-users": "2.59.6",
42
+ "@webex/babel-config-legacy": "2.59.8",
43
+ "@webex/eslint-config-legacy": "2.59.8",
44
+ "@webex/jest-config-legacy": "2.59.8",
45
+ "@webex/legacy-tools": "2.59.8",
46
+ "@webex/plugin-meetings": "2.59.8",
47
+ "@webex/plugin-rooms": "2.59.8",
48
+ "@webex/test-helper-chai": "2.59.8",
49
+ "@webex/test-helper-mocha": "2.59.8",
50
+ "@webex/test-helper-mock-webex": "2.59.8",
51
+ "@webex/test-helper-retry": "2.59.8",
52
+ "@webex/test-helper-test-users": "2.59.8",
53
53
  "chai": "^4.3.4",
54
54
  "chai-as-promised": "^7.1.1",
55
55
  "eslint": "^8.24.0",
@@ -60,15 +60,15 @@
60
60
  "typescript": "^4.7.4"
61
61
  },
62
62
  "dependencies": {
63
- "@webex/common": "2.59.6",
63
+ "@webex/common": "2.59.8",
64
64
  "@webex/internal-media-core": "0.0.7-beta",
65
- "@webex/internal-plugin-device": "2.59.6",
66
- "@webex/internal-plugin-metrics": "2.59.6",
67
- "@webex/internal-plugin-support": "2.59.6",
68
- "@webex/internal-plugin-user": "2.59.6",
69
- "@webex/plugin-people": "2.59.6",
65
+ "@webex/internal-plugin-device": "2.59.8",
66
+ "@webex/internal-plugin-metrics": "2.59.8",
67
+ "@webex/internal-plugin-support": "2.59.8",
68
+ "@webex/internal-plugin-user": "2.59.8",
69
+ "@webex/plugin-people": "2.59.8",
70
70
  "@webex/ts-sdp": "1.0.1",
71
- "@webex/webex-core": "2.59.6",
71
+ "@webex/webex-core": "2.59.8",
72
72
  "bowser": "^2.11.0",
73
73
  "btoa": "^1.2.1",
74
74
  "dotenv": "^4.0.0",
@@ -462,6 +462,7 @@ export default class Meeting extends StatelessWebexPlugin {
462
462
  shareStatus: string;
463
463
  statsAnalyzer: StatsAnalyzer;
464
464
  transcription: Transcription;
465
+ receiveTranscription: boolean;
465
466
  updateMediaConnections: (mediaConnections: any[]) => void;
466
467
  endCallInitiateJoinReq: any;
467
468
  endJoinReqResp: any;
@@ -1761,8 +1762,8 @@ export default class Meeting extends StatelessWebexPlugin {
1761
1762
  LOCUSINFO.EVENTS.CONTROLS_MEETING_TRANSCRIBE_UPDATED,
1762
1763
  ({caption, transcribing}) => {
1763
1764
  // @ts-ignore - config coming from registerPlugin
1764
- if (transcribing && this.transcription && this.config.receiveTranscription) {
1765
- this.receiveTranscription();
1765
+ if (transcribing && !this.transcription && this.config.receiveTranscription) {
1766
+ this.startTranscription();
1766
1767
  } else if (!transcribing && this.transcription) {
1767
1768
  Trigger.trigger(
1768
1769
  this,
@@ -2261,8 +2262,17 @@ export default class Meeting extends StatelessWebexPlugin {
2261
2262
  });
2262
2263
  }
2263
2264
  });
2264
- this.locusInfo.on(LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, (payload) => {
2265
+ this.locusInfo.on(LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, async (payload) => {
2265
2266
  this.stopKeepAlive();
2267
+ // @ts-ignore
2268
+ if (!this.transcription && (this.config.receiveTranscription || this.receiveTranscription)) {
2269
+ if (this.isTranscriptionSupported()) {
2270
+ await this.startTranscription();
2271
+ LoggerProxy.logger.info(
2272
+ 'Meeting:index#setUpLocusInfoSelfListener --> enabled to receive transcription for guest user!'
2273
+ );
2274
+ }
2275
+ }
2266
2276
 
2267
2277
  if (payload) {
2268
2278
  Trigger.trigger(
@@ -3725,9 +3735,9 @@ export default class Meeting extends StatelessWebexPlugin {
3725
3735
  * @private
3726
3736
  * @returns {Promise<void>} a promise to open the WebSocket connection
3727
3737
  */
3728
- private async receiveTranscription() {
3738
+ private async startTranscription() {
3729
3739
  LoggerProxy.logger.info(
3730
- `Meeting:index#receiveTranscription -->
3740
+ `Meeting:index#startTranscription -->
3731
3741
  Attempting to generate a web socket url.`
3732
3742
  );
3733
3743
 
@@ -3744,7 +3754,7 @@ export default class Meeting extends StatelessWebexPlugin {
3744
3754
  });
3745
3755
 
3746
3756
  LoggerProxy.logger.info(
3747
- `Meeting:index#receiveTranscription -->
3757
+ `Meeting:index#startTranscription -->
3748
3758
  Generated web socket url succesfully.`
3749
3759
  );
3750
3760
 
@@ -3756,7 +3766,7 @@ export default class Meeting extends StatelessWebexPlugin {
3756
3766
  );
3757
3767
 
3758
3768
  LoggerProxy.logger.info(
3759
- `Meeting:index#receiveTranscription -->
3769
+ `Meeting:index#startTranscription -->
3760
3770
  opened LLM web socket connection successfully.`
3761
3771
  );
3762
3772
 
@@ -3783,7 +3793,7 @@ export default class Meeting extends StatelessWebexPlugin {
3783
3793
  // @ts-ignore - fix type
3784
3794
  this.transcription.connect(this.webex.credentials.supertoken.access_token);
3785
3795
  } catch (error) {
3786
- LoggerProxy.logger.error(`Meeting:index#receiveTranscription --> ${error}`);
3796
+ LoggerProxy.logger.error(`Meeting:index#startTranscription --> ${error}`);
3787
3797
  Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.RECEIVE_TRANSCRIPTION_FAILURE, {
3788
3798
  correlation_id: this.correlationId,
3789
3799
  reason: error.message,
@@ -3956,6 +3966,7 @@ export default class Meeting extends StatelessWebexPlugin {
3956
3966
  .then((join) => {
3957
3967
  joinSuccess(join);
3958
3968
  this.deferJoin = undefined;
3969
+ this.receiveTranscription = !!options.receiveTranscription;
3959
3970
  Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.JOIN_SUCCESS, {
3960
3971
  correlation_id: this.correlationId,
3961
3972
  });
@@ -3965,10 +3976,10 @@ export default class Meeting extends StatelessWebexPlugin {
3965
3976
  .then(async (join) => {
3966
3977
  if (isBrowser) {
3967
3978
  // @ts-ignore - config coming from registerPlugin
3968
- if (this.config.receiveTranscription || options.receiveTranscription) {
3979
+ if (this.config.receiveTranscription || this.receiveTranscription) {
3969
3980
  if (this.isTranscriptionSupported()) {
3970
- await this.receiveTranscription();
3971
- LoggerProxy.logger.info('Meeting:index#join --> enabled to recieve transcription!');
3981
+ await this.startTranscription();
3982
+ LoggerProxy.logger.info('Meeting:index#join --> enabled to receive transcription!');
3972
3983
  }
3973
3984
  }
3974
3985
  } else {
@@ -5733,7 +5744,7 @@ export default class Meeting extends StatelessWebexPlugin {
5733
5744
  if (layoutType) {
5734
5745
  if (!LAYOUT_TYPES.includes(layoutType)) {
5735
5746
  return this.rejectWithErrorLog(
5736
- 'Meeting:index#changeVideoLayout --> cannot change video layout, invalid layoutType recieved.'
5747
+ 'Meeting:index#changeVideoLayout --> cannot change video layout, invalid layoutType received.'
5737
5748
  );
5738
5749
  }
5739
5750
 
@@ -770,12 +770,12 @@ describe('plugin-meetings', () => {
770
770
  assert.equal(meeting.isTranscriptionSupported(), true);
771
771
  });
772
772
  });
773
- describe('#receiveTranscription', () => {
773
+ describe('#startTranscription', () => {
774
774
  it('should invoke subscribe method to invoke the callback', () => {
775
775
  meeting.monitorTranscriptionSocketConnection = sinon.stub();
776
776
  meeting.initializeTranscription = sinon.stub();
777
777
 
778
- meeting.receiveTranscription().then(() => {
778
+ meeting.startTranscription().then(() => {
779
779
  assert.equal(true, false);
780
780
  assert.calledOnce(meeting.initializeTranscription);
781
781
  assert.calledOnce(meeting.monitorTranscriptionSocketConnection);
@@ -786,7 +786,7 @@ describe('plugin-meetings', () => {
786
786
  meeting.request = sinon.stub().returns(Promise.reject());
787
787
 
788
788
  try {
789
- await meeting.receiveTranscription();
789
+ await meeting.startTranscription();
790
790
  } catch (err) {
791
791
  assert(err, {});
792
792
  }
@@ -840,12 +840,12 @@ describe('plugin-meetings', () => {
840
840
  assert.calledOnce(MeetingUtil.joinMeeting);
841
841
  assert.calledOnce(meeting.setLocus);
842
842
  });
843
- it('should invoke `receiveTranscription()` if receiveTranscription is set to true', async () => {
843
+ it('should invoke `startTranscription()` if receiveTranscription is set to true', async () => {
844
844
  meeting.isTranscriptionSupported = sinon.stub().returns(true);
845
- meeting.receiveTranscription = sinon.stub().returns(Promise.resolve());
845
+ meeting.startTranscription = sinon.stub().returns(Promise.resolve());
846
846
 
847
847
  await meeting.join({receiveTranscription: true});
848
- assert.calledOnce(meeting.receiveTranscription);
848
+ assert.calledOnce(meeting.startTranscription);
849
849
  });
850
850
 
851
851
  it('should not create new correlation ID on join immediately after create', async () => {
@@ -3643,8 +3643,49 @@ describe('plugin-meetings', () => {
3643
3643
  );
3644
3644
  done();
3645
3645
  });
3646
+ it('transcription should start when configured when guest admitted', (done) => {
3647
+ meeting.isTranscriptionSupported = sinon.stub().returns(true);
3648
+ meeting.receiveTranscription = sinon.stub().returns(true);
3649
+ meeting.startTranscription = sinon.stub();
3650
+
3651
+ meeting.locusInfo.emit({function: 'test', file: 'test'}, 'SELF_ADMITTED_GUEST', test1);
3652
+ assert.calledOnce(meeting.startTranscription);
3653
+ done();
3654
+ });
3646
3655
  });
3647
3656
 
3657
+ describe('#setupLocusControlsListener', () => {
3658
+ it('transcription should start when meeting transcribe state is updated with active transcribing', (done) => {
3659
+ const payload = {caption: true, transcribing: true};
3660
+ meeting.startTranscription = sinon.stub();
3661
+ meeting.config.receiveTranscription = true;
3662
+ meeting.transcription = null;
3663
+
3664
+ meeting.locusInfo.emit({function: 'meeting/index', file: 'setupLocusControlsListener'}, 'CONTROLS_MEETING_TRANSCRIBE_UPDATED', payload);
3665
+ assert.calledOnce(meeting.startTranscription);
3666
+ done();
3667
+ })
3668
+
3669
+ it('transcription should stop when meeting transcribe state is updated with inactive transcribing', (done) => {
3670
+ const payload = {caption: false, transcribing: false};
3671
+ meeting.startTranscription = sinon.stub();
3672
+ meeting.config.receiveTranscription = true;
3673
+ meeting.transcription = {};
3674
+
3675
+ meeting.locusInfo.emit({function: 'meeting/index', file: 'setupLocusControlsListener'}, 'CONTROLS_MEETING_TRANSCRIBE_UPDATED', payload);
3676
+ assert.notCalled(meeting.startTranscription);
3677
+ assert.calledTwice(TriggerProxy.trigger);
3678
+ assert.calledWith(
3679
+ TriggerProxy.trigger,
3680
+ sinon.match.instanceOf(Meeting),
3681
+ {file: 'meeting/index', function: 'setupLocusControlsListener'},
3682
+ 'meeting:receiveTranscription:stopped',
3683
+ payload
3684
+ );
3685
+ done();
3686
+ })
3687
+ })
3688
+
3648
3689
  describe('#setUpLocusUrlListener', () => {
3649
3690
  it('listens to the locus url update event', (done) => {
3650
3691
  const newLocusUrl = 'newLocusUrl/12345';