@webex/plugin-meetings 3.0.0-beta.141 → 3.0.0-beta.142
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/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/media/index.js +19 -7
- package/dist/media/index.js.map +1 -1
- package/dist/meeting/index.js +33 -33
- package/dist/meeting/index.js.map +1 -1
- package/package.json +20 -20
- package/src/media/index.ts +22 -6
- package/src/meeting/index.ts +56 -31
- package/test/unit/spec/media/index.ts +15 -15
- package/test/unit/spec/meeting/index.js +30 -30
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/plugin-meetings",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.142",
|
|
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.
|
|
36
|
-
"@webex/test-helper-chai": "3.0.0-beta.
|
|
37
|
-
"@webex/test-helper-mocha": "3.0.0-beta.
|
|
38
|
-
"@webex/test-helper-mock-webex": "3.0.0-beta.
|
|
39
|
-
"@webex/test-helper-retry": "3.0.0-beta.
|
|
40
|
-
"@webex/test-helper-test-users": "3.0.0-beta.
|
|
35
|
+
"@webex/plugin-meetings": "3.0.0-beta.142",
|
|
36
|
+
"@webex/test-helper-chai": "3.0.0-beta.142",
|
|
37
|
+
"@webex/test-helper-mocha": "3.0.0-beta.142",
|
|
38
|
+
"@webex/test-helper-mock-webex": "3.0.0-beta.142",
|
|
39
|
+
"@webex/test-helper-retry": "3.0.0-beta.142",
|
|
40
|
+
"@webex/test-helper-test-users": "3.0.0-beta.142",
|
|
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.
|
|
50
|
-
"@webex/internal-media-core": "1.38.
|
|
51
|
-
"@webex/internal-plugin-conversation": "3.0.0-beta.
|
|
52
|
-
"@webex/internal-plugin-device": "3.0.0-beta.
|
|
53
|
-
"@webex/internal-plugin-llm": "3.0.0-beta.
|
|
54
|
-
"@webex/internal-plugin-mercury": "3.0.0-beta.
|
|
55
|
-
"@webex/internal-plugin-metrics": "3.0.0-beta.
|
|
56
|
-
"@webex/internal-plugin-support": "3.0.0-beta.
|
|
57
|
-
"@webex/internal-plugin-user": "3.0.0-beta.
|
|
58
|
-
"@webex/media-helpers": "3.0.0-beta.
|
|
59
|
-
"@webex/plugin-people": "3.0.0-beta.
|
|
60
|
-
"@webex/plugin-rooms": "3.0.0-beta.
|
|
61
|
-
"@webex/webex-core": "3.0.0-beta.
|
|
49
|
+
"@webex/common": "3.0.0-beta.142",
|
|
50
|
+
"@webex/internal-media-core": "1.38.3",
|
|
51
|
+
"@webex/internal-plugin-conversation": "3.0.0-beta.142",
|
|
52
|
+
"@webex/internal-plugin-device": "3.0.0-beta.142",
|
|
53
|
+
"@webex/internal-plugin-llm": "3.0.0-beta.142",
|
|
54
|
+
"@webex/internal-plugin-mercury": "3.0.0-beta.142",
|
|
55
|
+
"@webex/internal-plugin-metrics": "3.0.0-beta.142",
|
|
56
|
+
"@webex/internal-plugin-support": "3.0.0-beta.142",
|
|
57
|
+
"@webex/internal-plugin-user": "3.0.0-beta.142",
|
|
58
|
+
"@webex/media-helpers": "3.0.0-beta.142",
|
|
59
|
+
"@webex/plugin-people": "3.0.0-beta.142",
|
|
60
|
+
"@webex/plugin-rooms": "3.0.0-beta.142",
|
|
61
|
+
"@webex/webex-core": "3.0.0-beta.142",
|
|
62
62
|
"ampersand-collection": "^2.0.2",
|
|
63
63
|
"bowser": "^2.11.0",
|
|
64
64
|
"btoa": "^1.2.1",
|
package/src/media/index.ts
CHANGED
|
@@ -77,6 +77,22 @@ Media.getLocalMedia = (options: any, config: object) => {
|
|
|
77
77
|
return Promise.resolve(undefined);
|
|
78
78
|
};
|
|
79
79
|
|
|
80
|
+
Media.getDirection = (receive: boolean, send: boolean) => {
|
|
81
|
+
if (!receive && !send) {
|
|
82
|
+
return 'inactive';
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (receive && send) {
|
|
86
|
+
return 'sendrecv';
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (receive) {
|
|
90
|
+
return 'recvonly';
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return 'sendonly';
|
|
94
|
+
};
|
|
95
|
+
|
|
80
96
|
/**
|
|
81
97
|
* creates a webrtc media connection with provided tracks and mediaDirection configuration
|
|
82
98
|
*
|
|
@@ -180,17 +196,17 @@ Media.createMediaConnection = (
|
|
|
180
196
|
},
|
|
181
197
|
},
|
|
182
198
|
{
|
|
183
|
-
|
|
199
|
+
localTracks: {
|
|
184
200
|
audio: audioTrack?.underlyingTrack,
|
|
185
201
|
video: videoTrack?.underlyingTrack,
|
|
186
202
|
screenShareVideo: shareTrack?.underlyingTrack,
|
|
187
203
|
},
|
|
188
|
-
|
|
189
|
-
audio: mediaDirection.receiveAudio,
|
|
190
|
-
video: mediaDirection.receiveVideo,
|
|
191
|
-
screenShareVideo: mediaDirection.receiveShare,
|
|
192
|
-
remoteQualityLevel,
|
|
204
|
+
direction: {
|
|
205
|
+
audio: Media.getDirection(mediaDirection.receiveAudio, mediaDirection.sendAudio),
|
|
206
|
+
video: Media.getDirection(mediaDirection.receiveVideo, mediaDirection.sendVideo),
|
|
207
|
+
screenShareVideo: Media.getDirection(mediaDirection.receiveShare, mediaDirection.sendShare),
|
|
193
208
|
},
|
|
209
|
+
remoteQualityLevel,
|
|
194
210
|
},
|
|
195
211
|
debugId
|
|
196
212
|
);
|
package/src/meeting/index.ts
CHANGED
|
@@ -5994,8 +5994,8 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
5994
5994
|
.then(() => this.preMedia(localStream, localShare, mediaSettings))
|
|
5995
5995
|
.then(() =>
|
|
5996
5996
|
this.mediaProperties.webrtcMediaConnection
|
|
5997
|
-
.
|
|
5998
|
-
|
|
5997
|
+
.update({
|
|
5998
|
+
localTracks: {
|
|
5999
5999
|
audio: this.mediaProperties.mediaDirection.sendAudio
|
|
6000
6000
|
? this.mediaProperties.audioTrack.underlyingTrack
|
|
6001
6001
|
: null,
|
|
@@ -6006,17 +6006,24 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
6006
6006
|
? this.mediaProperties.shareTrack.underlyingTrack
|
|
6007
6007
|
: null,
|
|
6008
6008
|
},
|
|
6009
|
-
|
|
6010
|
-
audio:
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6009
|
+
direction: {
|
|
6010
|
+
audio: Media.getDirection(
|
|
6011
|
+
this.mediaProperties.mediaDirection.receiveAudio,
|
|
6012
|
+
this.mediaProperties.mediaDirection.sendAudio
|
|
6013
|
+
),
|
|
6014
|
+
video: Media.getDirection(
|
|
6015
|
+
this.mediaProperties.mediaDirection.receiveVideo,
|
|
6016
|
+
this.mediaProperties.mediaDirection.sendVideo
|
|
6017
|
+
),
|
|
6018
|
+
screenShareVideo: Media.getDirection(
|
|
6019
|
+
this.mediaProperties.mediaDirection.receiveShare,
|
|
6020
|
+
this.mediaProperties.mediaDirection.sendShare
|
|
6021
|
+
),
|
|
6014
6022
|
},
|
|
6023
|
+
remoteQualityLevel: this.mediaProperties.remoteQualityLevel,
|
|
6015
6024
|
})
|
|
6016
6025
|
.then(() => {
|
|
6017
|
-
LoggerProxy.logger.info(
|
|
6018
|
-
`${LOG_HEADER} webrtcMediaConnection.updateSendReceiveOptions done`
|
|
6019
|
-
);
|
|
6026
|
+
LoggerProxy.logger.info(`${LOG_HEADER} webrtcMediaConnection.update done`);
|
|
6020
6027
|
})
|
|
6021
6028
|
.catch((error) => {
|
|
6022
6029
|
LoggerProxy.logger.error(`${LOG_HEADER} Error updatedMedia, `, error);
|
|
@@ -6096,14 +6103,20 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
6096
6103
|
|
|
6097
6104
|
return MeetingUtil.validateOptions({sendAudio, localStream: stream})
|
|
6098
6105
|
.then(() =>
|
|
6099
|
-
this.mediaProperties.webrtcMediaConnection.
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
audio:
|
|
6103
|
-
video:
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
+
this.mediaProperties.webrtcMediaConnection.update({
|
|
6107
|
+
localTracks: {audio: track},
|
|
6108
|
+
direction: {
|
|
6109
|
+
audio: Media.getDirection(receiveAudio, sendAudio),
|
|
6110
|
+
video: Media.getDirection(
|
|
6111
|
+
this.mediaProperties.mediaDirection.receiveVideo,
|
|
6112
|
+
this.mediaProperties.mediaDirection.sendVideo
|
|
6113
|
+
),
|
|
6114
|
+
screenShareVideo: Media.getDirection(
|
|
6115
|
+
this.mediaProperties.mediaDirection.receiveShare,
|
|
6116
|
+
this.mediaProperties.mediaDirection.sendShare
|
|
6117
|
+
),
|
|
6106
6118
|
},
|
|
6119
|
+
remoteQualityLevel: this.mediaProperties.remoteQualityLevel,
|
|
6107
6120
|
})
|
|
6108
6121
|
)
|
|
6109
6122
|
.then(() => {
|
|
@@ -6153,14 +6166,20 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
6153
6166
|
|
|
6154
6167
|
return MeetingUtil.validateOptions({sendVideo, localStream: stream})
|
|
6155
6168
|
.then(() =>
|
|
6156
|
-
this.mediaProperties.webrtcMediaConnection.
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
audio:
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6169
|
+
this.mediaProperties.webrtcMediaConnection.update({
|
|
6170
|
+
localTracks: {video: track},
|
|
6171
|
+
direction: {
|
|
6172
|
+
audio: Media.getDirection(
|
|
6173
|
+
this.mediaProperties.mediaDirection.receiveAudio,
|
|
6174
|
+
this.mediaProperties.mediaDirection.sendAudio
|
|
6175
|
+
),
|
|
6176
|
+
video: Media.getDirection(receiveVideo, sendVideo),
|
|
6177
|
+
screenShareVideo: Media.getDirection(
|
|
6178
|
+
this.mediaProperties.mediaDirection.receiveShare,
|
|
6179
|
+
this.mediaProperties.mediaDirection.sendShare
|
|
6180
|
+
),
|
|
6163
6181
|
},
|
|
6182
|
+
remoteQualityLevel: this.mediaProperties.remoteQualityLevel,
|
|
6164
6183
|
})
|
|
6165
6184
|
)
|
|
6166
6185
|
.then(() => {
|
|
@@ -6241,14 +6260,20 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
6241
6260
|
.then(() => this.checkForStopShare(sendShare, previousSendShareStatus))
|
|
6242
6261
|
.then((startShare) =>
|
|
6243
6262
|
this.mediaProperties.webrtcMediaConnection
|
|
6244
|
-
.
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
audio:
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6263
|
+
.update({
|
|
6264
|
+
localTracks: {screenShareVideo: track},
|
|
6265
|
+
direction: {
|
|
6266
|
+
audio: Media.getDirection(
|
|
6267
|
+
this.mediaProperties.mediaDirection.receiveAudio,
|
|
6268
|
+
this.mediaProperties.mediaDirection.sendAudio
|
|
6269
|
+
),
|
|
6270
|
+
video: Media.getDirection(
|
|
6271
|
+
this.mediaProperties.mediaDirection.receiveVideo,
|
|
6272
|
+
this.mediaProperties.mediaDirection.sendVideo
|
|
6273
|
+
),
|
|
6274
|
+
screenShareVideo: Media.getDirection(receiveShare, sendShare),
|
|
6251
6275
|
},
|
|
6276
|
+
remoteQualityLevel: this.mediaProperties.remoteQualityLevel,
|
|
6252
6277
|
})
|
|
6253
6278
|
.then(() =>
|
|
6254
6279
|
this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.LAMBDA, {
|
|
@@ -35,10 +35,10 @@ describe('createMediaConnection', () => {
|
|
|
35
35
|
Media.createMediaConnection(false, 'some debug id', {
|
|
36
36
|
mediaProperties: {
|
|
37
37
|
mediaDirection: {
|
|
38
|
-
sendAudio:
|
|
38
|
+
sendAudio: false,
|
|
39
39
|
sendVideo: true,
|
|
40
40
|
sendShare: false,
|
|
41
|
-
receiveAudio:
|
|
41
|
+
receiveAudio: false,
|
|
42
42
|
receiveVideo: true,
|
|
43
43
|
receiveShare: true,
|
|
44
44
|
},
|
|
@@ -82,17 +82,17 @@ describe('createMediaConnection', () => {
|
|
|
82
82
|
},
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
|
-
|
|
85
|
+
localTracks: {
|
|
86
86
|
audio: fakeAudioTrack.underlyingTrack,
|
|
87
87
|
video: fakeVideoTrack.underlyingTrack,
|
|
88
88
|
screenShareVideo: undefined,
|
|
89
89
|
},
|
|
90
|
-
|
|
91
|
-
audio:
|
|
92
|
-
video:
|
|
93
|
-
screenShareVideo:
|
|
94
|
-
remoteQualityLevel: 'HIGH',
|
|
90
|
+
direction: {
|
|
91
|
+
audio: 'inactive',
|
|
92
|
+
video: 'sendrecv',
|
|
93
|
+
screenShareVideo: 'recvonly',
|
|
95
94
|
},
|
|
95
|
+
remoteQualityLevel: 'HIGH',
|
|
96
96
|
},
|
|
97
97
|
'some debug id'
|
|
98
98
|
);
|
|
@@ -208,7 +208,7 @@ describe('createMediaConnection', () => {
|
|
|
208
208
|
const multistreamRoapMediaConnectionConstructorStub = sinon
|
|
209
209
|
.stub(internalMediaModule, 'MultistreamRoapMediaConnection')
|
|
210
210
|
.returns(fakeRoapMediaConnection);
|
|
211
|
-
|
|
211
|
+
|
|
212
212
|
Media.createMediaConnection(true, 'debug string', {
|
|
213
213
|
mediaProperties: {
|
|
214
214
|
mediaDirection: {
|
|
@@ -285,17 +285,17 @@ describe('createMediaConnection', () => {
|
|
|
285
285
|
},
|
|
286
286
|
},
|
|
287
287
|
{
|
|
288
|
-
|
|
288
|
+
localTracks: {
|
|
289
289
|
audio: fakeAudioTrack.underlyingTrack,
|
|
290
290
|
video: undefined,
|
|
291
291
|
screenShareVideo: fakeVideoTrack.underlyingTrack,
|
|
292
292
|
},
|
|
293
|
-
|
|
294
|
-
audio:
|
|
295
|
-
video:
|
|
296
|
-
screenShareVideo:
|
|
297
|
-
remoteQualityLevel: 'HIGH',
|
|
293
|
+
direction: {
|
|
294
|
+
audio: 'sendrecv',
|
|
295
|
+
video: 'sendrecv',
|
|
296
|
+
screenShareVideo: 'sendrecv',
|
|
298
297
|
},
|
|
298
|
+
remoteQualityLevel: 'HIGH',
|
|
299
299
|
},
|
|
300
300
|
'some debug id'
|
|
301
301
|
);
|
|
@@ -2313,11 +2313,11 @@ describe('plugin-meetings', () => {
|
|
|
2313
2313
|
receiveShare: true,
|
|
2314
2314
|
};
|
|
2315
2315
|
meeting.mediaProperties.webrtcMediaConnection = {
|
|
2316
|
-
|
|
2316
|
+
update: sinon.stub(),
|
|
2317
2317
|
};
|
|
2318
2318
|
sinon.stub(MeetingUtil, 'getTrack').returns({audioTrack: FAKE_AUDIO_TRACK});
|
|
2319
2319
|
});
|
|
2320
|
-
it('calls this.mediaProperties.webrtcMediaConnection.
|
|
2320
|
+
it('calls this.mediaProperties.webrtcMediaConnection.update', () =>
|
|
2321
2321
|
meeting
|
|
2322
2322
|
.updateAudio({
|
|
2323
2323
|
sendAudio: true,
|
|
@@ -2326,18 +2326,18 @@ describe('plugin-meetings', () => {
|
|
|
2326
2326
|
})
|
|
2327
2327
|
.then(() => {
|
|
2328
2328
|
assert.calledOnce(
|
|
2329
|
-
meeting.mediaProperties.webrtcMediaConnection.
|
|
2329
|
+
meeting.mediaProperties.webrtcMediaConnection.update
|
|
2330
2330
|
);
|
|
2331
2331
|
assert.calledWith(
|
|
2332
|
-
meeting.mediaProperties.webrtcMediaConnection.
|
|
2332
|
+
meeting.mediaProperties.webrtcMediaConnection.update,
|
|
2333
2333
|
{
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
audio:
|
|
2337
|
-
video:
|
|
2338
|
-
screenShareVideo:
|
|
2339
|
-
remoteQualityLevel: 'HIGH',
|
|
2334
|
+
localTracks: {audio: FAKE_AUDIO_TRACK},
|
|
2335
|
+
direction: {
|
|
2336
|
+
audio: 'sendrecv',
|
|
2337
|
+
video: 'sendrecv',
|
|
2338
|
+
screenShareVideo: 'recvonly',
|
|
2340
2339
|
},
|
|
2340
|
+
remoteQualityLevel: 'HIGH',
|
|
2341
2341
|
}
|
|
2342
2342
|
);
|
|
2343
2343
|
}));
|
|
@@ -2481,7 +2481,7 @@ describe('plugin-meetings', () => {
|
|
|
2481
2481
|
|
|
2482
2482
|
sandbox.stub(meeting, 'canUpdateMedia').returns(false);
|
|
2483
2483
|
meeting.mediaProperties.webrtcMediaConnection = {
|
|
2484
|
-
|
|
2484
|
+
update: sinon.stub().resolves({}),
|
|
2485
2485
|
};
|
|
2486
2486
|
|
|
2487
2487
|
let myPromiseResolved = false;
|
|
@@ -2497,7 +2497,7 @@ describe('plugin-meetings', () => {
|
|
|
2497
2497
|
});
|
|
2498
2498
|
|
|
2499
2499
|
// verify that nothing was done
|
|
2500
|
-
assert.notCalled(meeting.mediaProperties.webrtcMediaConnection.
|
|
2500
|
+
assert.notCalled(meeting.mediaProperties.webrtcMediaConnection.update);
|
|
2501
2501
|
|
|
2502
2502
|
// now trigger processing of the queue
|
|
2503
2503
|
meeting.canUpdateMedia.restore();
|
|
@@ -2506,22 +2506,22 @@ describe('plugin-meetings', () => {
|
|
|
2506
2506
|
meeting.processNextQueuedMediaUpdate();
|
|
2507
2507
|
await testUtils.flushPromises();
|
|
2508
2508
|
|
|
2509
|
-
// and check that
|
|
2510
|
-
assert.calledOnce(meeting.mediaProperties.webrtcMediaConnection.
|
|
2509
|
+
// and check that update is called with the original args
|
|
2510
|
+
assert.calledOnce(meeting.mediaProperties.webrtcMediaConnection.update);
|
|
2511
2511
|
assert.calledWith(
|
|
2512
|
-
meeting.mediaProperties.webrtcMediaConnection.
|
|
2512
|
+
meeting.mediaProperties.webrtcMediaConnection.update,
|
|
2513
2513
|
{
|
|
2514
|
-
|
|
2514
|
+
localTracks: {
|
|
2515
2515
|
audio: FAKE_TRACKS.audio,
|
|
2516
2516
|
video: FAKE_TRACKS.video,
|
|
2517
2517
|
screenShareVideo: FAKE_TRACKS.screenshareVideo,
|
|
2518
2518
|
},
|
|
2519
|
-
|
|
2520
|
-
audio:
|
|
2521
|
-
video:
|
|
2522
|
-
screenShareVideo:
|
|
2523
|
-
remoteQualityLevel: 'HIGH',
|
|
2519
|
+
direction: {
|
|
2520
|
+
audio: 'sendrecv',
|
|
2521
|
+
video: 'sendrecv',
|
|
2522
|
+
screenShareVideo: 'sendrecv',
|
|
2524
2523
|
},
|
|
2524
|
+
remoteQualityLevel: 'HIGH',
|
|
2525
2525
|
}
|
|
2526
2526
|
);
|
|
2527
2527
|
assert.isTrue(myPromiseResolved);
|
|
@@ -2544,8 +2544,8 @@ describe('plugin-meetings', () => {
|
|
|
2544
2544
|
eventListeners[event] = listener;
|
|
2545
2545
|
}),
|
|
2546
2546
|
|
|
2547
|
-
|
|
2548
|
-
// trigger ROAP_STARTED before
|
|
2547
|
+
update: sinon.stub().callsFake(() => {
|
|
2548
|
+
// trigger ROAP_STARTED before update() resolves
|
|
2549
2549
|
if (eventListeners[Event.ROAP_STARTED]) {
|
|
2550
2550
|
eventListeners[Event.ROAP_STARTED]();
|
|
2551
2551
|
} else {
|
|
@@ -2583,7 +2583,7 @@ describe('plugin-meetings', () => {
|
|
|
2583
2583
|
|
|
2584
2584
|
await testUtils.flushPromises();
|
|
2585
2585
|
|
|
2586
|
-
assert.calledOnce(meeting.mediaProperties.webrtcMediaConnection.
|
|
2586
|
+
assert.calledOnce(meeting.mediaProperties.webrtcMediaConnection.update);
|
|
2587
2587
|
assert.isFalse(myPromiseResolved);
|
|
2588
2588
|
|
|
2589
2589
|
// verify that requestScreenShareFloorStub was not called yet
|
|
@@ -2636,8 +2636,8 @@ describe('plugin-meetings', () => {
|
|
|
2636
2636
|
eventListeners[event] = listener;
|
|
2637
2637
|
}),
|
|
2638
2638
|
|
|
2639
|
-
|
|
2640
|
-
// trigger ROAP_STARTED before
|
|
2639
|
+
update: sinon.stub().callsFake(() => {
|
|
2640
|
+
// trigger ROAP_STARTED before update() resolves
|
|
2641
2641
|
if (eventListeners[Event.ROAP_STARTED]) {
|
|
2642
2642
|
eventListeners[Event.ROAP_STARTED]();
|
|
2643
2643
|
} else {
|
|
@@ -2678,7 +2678,7 @@ describe('plugin-meetings', () => {
|
|
|
2678
2678
|
|
|
2679
2679
|
await testUtils.flushPromises();
|
|
2680
2680
|
|
|
2681
|
-
assert.calledOnce(meeting.mediaProperties.webrtcMediaConnection.
|
|
2681
|
+
assert.calledOnce(meeting.mediaProperties.webrtcMediaConnection.update);
|
|
2682
2682
|
assert.isFalse(myPromiseResolved);
|
|
2683
2683
|
|
|
2684
2684
|
// verify that requestScreenShareFloorStub was not called yet
|
|
@@ -2694,8 +2694,8 @@ describe('plugin-meetings', () => {
|
|
|
2694
2694
|
it('when changing screen share stream and no roap transaction happening, it requests floor immediately', async () => {
|
|
2695
2695
|
let myPromiseResolved = false;
|
|
2696
2696
|
|
|
2697
|
-
// simulate a case when no roap transaction is triggered by
|
|
2698
|
-
meeting.mediaProperties.webrtcMediaConnection.
|
|
2697
|
+
// simulate a case when no roap transaction is triggered by update
|
|
2698
|
+
meeting.mediaProperties.webrtcMediaConnection.update = sinon
|
|
2699
2699
|
.stub()
|
|
2700
2700
|
.resolves({});
|
|
2701
2701
|
|
|
@@ -2711,7 +2711,7 @@ describe('plugin-meetings', () => {
|
|
|
2711
2711
|
|
|
2712
2712
|
await testUtils.flushPromises();
|
|
2713
2713
|
|
|
2714
|
-
assert.calledOnce(meeting.mediaProperties.webrtcMediaConnection.
|
|
2714
|
+
assert.calledOnce(meeting.mediaProperties.webrtcMediaConnection.update);
|
|
2715
2715
|
assert.calledOnce(requestScreenShareFloorStub);
|
|
2716
2716
|
assert.isTrue(myPromiseResolved);
|
|
2717
2717
|
});
|