@webex/plugin-meetings 3.0.0-beta.332 → 3.0.0-beta.334

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.
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import SortedQueue from '../common/queue';
3
2
  type LocusDeltaDto = {
4
3
  url: string;
@@ -34,7 +33,7 @@ export default class Parser {
34
33
  };
35
34
  queue: SortedQueue<LocusDeltaDto>;
36
35
  workingCopy: any;
37
- syncTimer: null | number | NodeJS.Timeout;
36
+ syncTimer?: ReturnType<typeof setTimeout>;
38
37
  /**
39
38
  * @constructs Parser
40
39
  */
@@ -868,7 +868,7 @@ export default class Meeting extends StatelessWebexPlugin {
868
868
  * @returns {undefined}
869
869
  * @memberof Meeting
870
870
  */
871
- closeRemoteStreams(): Promise<[any, any, any, any]>;
871
+ closeRemoteStreams(): Promise<[any, any, any]>;
872
872
  /**
873
873
  * Stores the reference to a new microphone stream, sets up the required event listeners
874
874
  * on it, cleans up previous stream, etc.
@@ -62,7 +62,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
62
62
  updateCanManageWebcast: function updateCanManageWebcast(canManageWebcast) {
63
63
  this.set('canManageWebcast', canManageWebcast);
64
64
  },
65
- version: "3.0.0-beta.332"
65
+ version: "3.0.0-beta.334"
66
66
  });
67
67
  var _default = Webinar;
68
68
  exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webex/plugin-meetings",
3
- "version": "3.0.0-beta.332",
3
+ "version": "3.0.0-beta.334",
4
4
  "description": "",
5
5
  "license": "Cisco EULA (https://www.cisco.com/c/en/us/products/end-user-license-agreement.html)",
6
6
  "contributors": [
@@ -33,12 +33,12 @@
33
33
  },
34
34
  "devDependencies": {
35
35
  "@peculiar/webcrypto": "^1.4.3",
36
- "@webex/plugin-meetings": "3.0.0-beta.332",
37
- "@webex/test-helper-chai": "3.0.0-beta.332",
38
- "@webex/test-helper-mocha": "3.0.0-beta.332",
39
- "@webex/test-helper-mock-webex": "3.0.0-beta.332",
40
- "@webex/test-helper-retry": "3.0.0-beta.332",
41
- "@webex/test-helper-test-users": "3.0.0-beta.332",
36
+ "@webex/plugin-meetings": "3.0.0-beta.334",
37
+ "@webex/test-helper-chai": "3.0.0-beta.334",
38
+ "@webex/test-helper-mocha": "3.0.0-beta.334",
39
+ "@webex/test-helper-mock-webex": "3.0.0-beta.334",
40
+ "@webex/test-helper-retry": "3.0.0-beta.334",
41
+ "@webex/test-helper-test-users": "3.0.0-beta.334",
42
42
  "chai": "^4.3.4",
43
43
  "chai-as-promised": "^7.1.1",
44
44
  "jsdom-global": "3.0.2",
@@ -47,19 +47,19 @@
47
47
  "typescript": "^4.7.4"
48
48
  },
49
49
  "dependencies": {
50
- "@webex/common": "3.0.0-beta.332",
51
- "@webex/internal-media-core": "2.2.2",
52
- "@webex/internal-plugin-conversation": "3.0.0-beta.332",
53
- "@webex/internal-plugin-device": "3.0.0-beta.332",
54
- "@webex/internal-plugin-llm": "3.0.0-beta.332",
55
- "@webex/internal-plugin-mercury": "3.0.0-beta.332",
56
- "@webex/internal-plugin-metrics": "3.0.0-beta.332",
57
- "@webex/internal-plugin-support": "3.0.0-beta.332",
58
- "@webex/internal-plugin-user": "3.0.0-beta.332",
59
- "@webex/media-helpers": "3.0.0-beta.332",
60
- "@webex/plugin-people": "3.0.0-beta.332",
61
- "@webex/plugin-rooms": "3.0.0-beta.332",
62
- "@webex/webex-core": "3.0.0-beta.332",
50
+ "@webex/common": "3.0.0-beta.334",
51
+ "@webex/internal-media-core": "2.2.3",
52
+ "@webex/internal-plugin-conversation": "3.0.0-beta.334",
53
+ "@webex/internal-plugin-device": "3.0.0-beta.334",
54
+ "@webex/internal-plugin-llm": "3.0.0-beta.334",
55
+ "@webex/internal-plugin-mercury": "3.0.0-beta.334",
56
+ "@webex/internal-plugin-metrics": "3.0.0-beta.334",
57
+ "@webex/internal-plugin-support": "3.0.0-beta.334",
58
+ "@webex/internal-plugin-user": "3.0.0-beta.334",
59
+ "@webex/media-helpers": "3.0.0-beta.334",
60
+ "@webex/plugin-people": "3.0.0-beta.334",
61
+ "@webex/plugin-rooms": "3.0.0-beta.334",
62
+ "@webex/webex-core": "3.0.0-beta.334",
63
63
  "ampersand-collection": "^2.0.2",
64
64
  "bowser": "^2.11.0",
65
65
  "btoa": "^1.2.1",
@@ -53,7 +53,7 @@ export default class Parser {
53
53
 
54
54
  queue: SortedQueue<LocusDeltaDto>;
55
55
  workingCopy: any;
56
- syncTimer: null | number | NodeJS.Timeout;
56
+ syncTimer?: ReturnType<typeof setTimeout>;
57
57
 
58
58
  /**
59
59
  * @constructs Parser
@@ -85,7 +85,7 @@ export default class Parser {
85
85
  this.status = 'IDLE';
86
86
  this.onDeltaAction = null;
87
87
  this.workingCopy = null;
88
- this.syncTimer = null;
88
+ this.syncTimer = undefined;
89
89
  }
90
90
 
91
91
  /**
@@ -673,11 +673,11 @@ export default class Parser {
673
673
  * @returns {undefined}
674
674
  */
675
675
  private startSyncTimer() {
676
- if (this.syncTimer === null) {
676
+ if (this.syncTimer === undefined) {
677
677
  const timeout = OOO_DELTA_WAIT_TIME + Math.random() * OOO_DELTA_WAIT_TIME_RANDOM_DELAY;
678
678
 
679
679
  this.syncTimer = setTimeout(() => {
680
- this.syncTimer = null;
680
+ this.syncTimer = undefined;
681
681
  this.triggerSync('timer expired, blocked on out-of-order delta');
682
682
  }, timeout);
683
683
  }
@@ -689,9 +689,9 @@ export default class Parser {
689
689
  * @returns {undefined}
690
690
  */
691
691
  private stopSyncTimer() {
692
- if (this.syncTimer !== null) {
692
+ if (this.syncTimer !== undefined) {
693
693
  clearTimeout(this.syncTimer);
694
- this.syncTimer = null;
694
+ this.syncTimer = undefined;
695
695
  }
696
696
  }
697
697
 
@@ -217,10 +217,10 @@ Media.createMediaConnection = (
217
217
  {
218
218
  // TODO: RoapMediaConnection is not ready to use stream classes yet, so we pass the raw MediaStreamTrack for now SPARK-460530
219
219
  localTracks: {
220
- audio: audioStream?.outputTrack,
221
- video: videoStream?.outputTrack,
222
- screenShareVideo: shareVideoStream?.outputTrack,
223
- screenShareAudio: shareAudioStream?.outputTrack, // TODO: add type for screenShareAudio in internal-media-core SPARK-446923
220
+ audio: audioStream?.outputStream?.getTracks()[0],
221
+ video: videoStream?.outputStream?.getTracks()[0],
222
+ screenShareVideo: shareVideoStream?.outputStream?.getTracks()[0],
223
+ screenShareAudio: shareAudioStream?.outputStream?.getTracks()[0], // TODO: add type for screenShareAudio in internal-media-core SPARK-446923
224
224
  } as unknown,
225
225
  direction: {
226
226
  audio: Media.getDirection(true, mediaDirection.receiveAudio, mediaDirection.sendAudio),
@@ -399,7 +399,7 @@ Media.stopStream = (stream: LocalStream) => {
399
399
  stream.stop();
400
400
  } catch (e) {
401
401
  LoggerProxy.logger.error(
402
- `Media:index#stopStream --> Unable to stop the stream with ready state of the output track => ${stream.outputTrack.readyState} & input track => ${stream.inputTrack.readyState}, error: ${e}`
402
+ `Media:index#stopStream --> Unable to stop the stream with ready state => ${stream.readyState}, error: ${e}`
403
403
  );
404
404
  }
405
405
  });
@@ -3633,8 +3633,7 @@ export default class Meeting extends StatelessWebexPlugin {
3633
3633
  * @memberof Meeting
3634
3634
  */
3635
3635
  closeRemoteStreams() {
3636
- const {remoteAudioStream, remoteVideoStream, remoteShareStream, shareAudioStream} =
3637
- this.mediaProperties;
3636
+ const {remoteAudioStream, remoteVideoStream, remoteShareStream} = this.mediaProperties;
3638
3637
 
3639
3638
  /**
3640
3639
  * Triggers an event to the developer
@@ -3675,7 +3674,6 @@ export default class Meeting extends StatelessWebexPlugin {
3675
3674
  stopStream(remoteAudioStream, EVENT_TYPES.REMOTE_AUDIO),
3676
3675
  stopStream(remoteVideoStream, EVENT_TYPES.REMOTE_VIDEO),
3677
3676
  stopStream(remoteShareStream, EVENT_TYPES.REMOTE_SHARE),
3678
- stopStream(shareAudioStream, EVENT_TYPES.REMOTE_SHARE_AUDIO),
3679
3677
  ]);
3680
3678
  }
3681
3679
 
@@ -7776,10 +7774,12 @@ export default class Meeting extends StatelessWebexPlugin {
7776
7774
  .update({
7777
7775
  // TODO: RoapMediaConnection is not ready to use stream classes yet, so we pass the raw MediaStreamTrack for now
7778
7776
  localTracks: {
7779
- audio: this.mediaProperties.audioStream?.outputTrack || null,
7780
- video: this.mediaProperties.videoStream?.outputTrack || null,
7781
- screenShareVideo: this.mediaProperties.shareVideoStream?.outputTrack || null,
7782
- screenShareAudio: this.mediaProperties.shareAudioStream?.outputTrack || null,
7777
+ audio: this.mediaProperties.audioStream?.outputStream?.getTracks()[0] || null,
7778
+ video: this.mediaProperties.videoStream?.outputStream?.getTracks()[0] || null,
7779
+ screenShareVideo:
7780
+ this.mediaProperties.shareVideoStream?.outputStream?.getTracks()[0] || null,
7781
+ screenShareAudio:
7782
+ this.mediaProperties.shareAudioStream?.outputStream?.getTracks()[0] || null,
7783
7783
  },
7784
7784
  direction: {
7785
7785
  audio: Media.getDirection(
@@ -16,16 +16,32 @@ describe('createMediaConnection', () => {
16
16
  id: 'any fake track'
17
17
  }
18
18
  const fakeAudioStream = {
19
- outputTrack: fakeTrack,
19
+ outputStream: {
20
+ getTracks: () => {
21
+ return [fakeTrack];
22
+ }
23
+ }
20
24
  };
21
25
  const fakeVideoStream = {
22
- outputTrack: fakeTrack,
26
+ outputStream: {
27
+ getTracks: () => {
28
+ return [fakeTrack];
29
+ }
30
+ }
23
31
  };
24
32
  const fakeShareVideoStream = {
25
- outputTrack: fakeTrack,
33
+ outputStream: {
34
+ getTracks: () => {
35
+ return [fakeTrack];
36
+ }
37
+ }
26
38
  };
27
39
  const fakeShareAudioStream = {
28
- outputTrack: fakeTrack,
40
+ outputStream: {
41
+ getTracks: () => {
42
+ return [fakeTrack];
43
+ }
44
+ }
29
45
  };
30
46
  afterEach(() => {
31
47
  sinon.restore();
@@ -2616,8 +2616,12 @@ describe('plugin-meetings', () => {
2616
2616
  setUnmuteAllowed: sinon.stub(),
2617
2617
  setMuted: sinon.stub(),
2618
2618
  setServerMuted: sinon.stub(),
2619
- outputTrack: {
2620
- id: 'fake mic'
2619
+ outputStream: {
2620
+ getTracks: () => {
2621
+ return [{
2622
+ id: 'fake mic'
2623
+ }];
2624
+ }
2621
2625
  }
2622
2626
  }
2623
2627
 
@@ -2828,10 +2832,10 @@ describe('plugin-meetings', () => {
2828
2832
  assert.calledOnceWithExactly(roapMediaConnectionConstructorStub, mediaConnectionConfig,
2829
2833
  {
2830
2834
  localTracks: {
2831
- audio: localStreams.audio?.outputTrack,
2832
- video: localStreams.video?.outputTrack,
2833
- screenShareVideo: localStreams.screenShareVideo?.outputTrack,
2834
- screenShareAudio: localStreams.screenShareAudio?.outputTrack,
2835
+ audio: localStreams.audio?.outputStream?.getTracks()[0],
2836
+ video: localStreams.video?.outputStream?.getTracks()[0],
2837
+ screenShareVideo: localStreams.screenShareVideo?.outputStream?.getTracks()[0],
2838
+ screenShareAudio: localStreams.screenShareAudio?.outputStream?.getTracks()[0],
2835
2839
  },
2836
2840
  direction: {audio: direction.audio, video: direction.video, screenShareVideo: direction.screenShare},
2837
2841
  remoteQualityLevel,
@@ -3106,7 +3110,7 @@ describe('plugin-meetings', () => {
3106
3110
  assert.calledOnceWithExactly(meeting.sendSlotManager.getSlot(MediaType.AudioMain).publishStream, fakeMicrophoneStream);
3107
3111
  } else {
3108
3112
  assert.calledOnceWithExactly(fakeRoapMediaConnection.update, {
3109
- localTracks: { audio: fakeMicrophoneStream.outputTrack, video: null, screenShareVideo: null, screenShareAudio: null },
3113
+ localTracks: { audio: fakeMicrophoneStream.outputStream.getTracks()[0], video: null, screenShareVideo: null, screenShareAudio: null },
3110
3114
  direction: {
3111
3115
  audio: expected.direction,
3112
3116
  video: 'sendrecv',
@@ -3132,8 +3136,12 @@ describe('plugin-meetings', () => {
3132
3136
  muted: false,
3133
3137
  setUnmuteAllowed: sinon.stub(),
3134
3138
  setMuted: sinon.stub(),
3135
- outputTrack:{
3136
- id: 'fake mic 2',
3139
+ outputStream: {
3140
+ getTracks: () => {
3141
+ return [{
3142
+ id: 'fake mic 2',
3143
+ }];
3144
+ }
3137
3145
  }
3138
3146
  }
3139
3147
 
@@ -3145,7 +3153,7 @@ describe('plugin-meetings', () => {
3145
3153
  assert.calledOnceWithExactly(meeting.sendSlotManager.getSlot(MediaType.AudioMain).publishStream, fakeMicrophoneStream2);
3146
3154
  } else {
3147
3155
  assert.calledOnceWithExactly(fakeRoapMediaConnection.update, {
3148
- localTracks: { audio: fakeMicrophoneStream2.outputTrack, video: null, screenShareVideo: null, screenShareAudio: null },
3156
+ localTracks: { audio: fakeMicrophoneStream2.outputStream.getTracks()[0], video: null, screenShareVideo: null, screenShareAudio: null },
3149
3157
  direction: {
3150
3158
  audio: expected.direction,
3151
3159
  video: 'sendrecv',
@@ -3216,7 +3224,7 @@ describe('plugin-meetings', () => {
3216
3224
  assert.equal(meeting.sendSlotManager.getSlot(MediaType.AudioMain).active, expectedDirection !== 'inactive');
3217
3225
  } else {
3218
3226
  assert.calledOnceWithExactly(fakeRoapMediaConnection.update, {
3219
- localTracks: { audio: expectedStream?.outputTrack ?? null, video: null, screenShareVideo: null, screenShareAudio: null },
3227
+ localTracks: { audio: expectedStream?.outputStream.getTracks()[0] ?? null, video: null, screenShareVideo: null, screenShareAudio: null },
3220
3228
  direction: {
3221
3229
  audio: expectedDirection,
3222
3230
  video: 'sendrecv',
@@ -3666,7 +3674,11 @@ describe('plugin-meetings', () => {
3666
3674
  let sandbox;
3667
3675
 
3668
3676
  const createFakeLocalStream = () => ({
3669
- outputTrack: {id: 'fake underlying track'},
3677
+ outputStream: {
3678
+ getTracks: () => {
3679
+ return [{id: 'fake underlying track'}];
3680
+ }
3681
+ }
3670
3682
  });
3671
3683
  beforeEach(() => {
3672
3684
  sandbox = sinon.createSandbox();
@@ -3749,10 +3761,10 @@ describe('plugin-meetings', () => {
3749
3761
  meeting.mediaProperties.webrtcMediaConnection.update,
3750
3762
  {
3751
3763
  localTracks: {
3752
- audio: meeting.mediaProperties.audioStream.outputTrack,
3753
- video: meeting.mediaProperties.videoStream.outputTrack,
3754
- screenShareVideo: meeting.mediaProperties.shareVideoStream.outputTrack,
3755
- screenShareAudio: meeting.mediaProperties.shareVideoStream.outputTrack,
3764
+ audio: meeting.mediaProperties.audioStream.outputStream.getTracks()[0],
3765
+ video: meeting.mediaProperties.videoStream.outputStream.getTracks()[0],
3766
+ screenShareVideo: meeting.mediaProperties.shareVideoStream.outputStream.getTracks()[0],
3767
+ screenShareAudio: meeting.mediaProperties.shareVideoStream.outputStream.getTracks()[0],
3756
3768
  },
3757
3769
  direction: {
3758
3770
  audio: 'inactive',
@@ -3781,7 +3793,13 @@ describe('plugin-meetings', () => {
3781
3793
  meeting.mediaProperties.mediaDirection = mediaDirection;
3782
3794
  meeting.mediaProperties.remoteVideoStream = sinon
3783
3795
  .stub()
3784
- .returns({outputTrack: {id: 'some mock id'}});
3796
+ .returns({
3797
+ outputStream: {
3798
+ getTracks: () => {
3799
+ id: 'some mock id'
3800
+ }
3801
+ }
3802
+ });
3785
3803
 
3786
3804
  meeting.meetingRequest.changeVideoLayoutDebounced = sinon
3787
3805
  .stub()
@@ -5779,7 +5797,7 @@ describe('plugin-meetings', () => {
5779
5797
  it('should stop remote tracks, and trigger a media:stopped event when the remote tracks are stopped', async () => {
5780
5798
  await meeting.closeRemoteStreams();
5781
5799
 
5782
- assert.equal(TriggerProxy.trigger.callCount, 6);
5800
+ assert.equal(TriggerProxy.trigger.callCount, 5);
5783
5801
  assert.calledWith(
5784
5802
  TriggerProxy.trigger,
5785
5803
  sinon.match.instanceOf(Meeting),