@webex/plugin-meetings 3.12.0-next.106 → 3.12.0-next.107
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/aiEnableRequest/index.js +1 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/meeting/index.js +16 -1
- package/dist/meeting/index.js.map +1 -1
- package/dist/webinar/index.js +1 -1
- package/package.json +1 -1
- package/src/meeting/index.ts +15 -1
- package/test/unit/spec/meeting/index.js +228 -113
package/dist/webinar/index.js
CHANGED
package/package.json
CHANGED
package/src/meeting/index.ts
CHANGED
|
@@ -7542,14 +7542,28 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
7542
7542
|
// @ts-ignore
|
|
7543
7543
|
const cdl = this.webex.internal.newMetrics.callDiagnosticLatencies;
|
|
7544
7544
|
|
|
7545
|
+
// Save the remote-sdp-received timestamp before submitting the client event so we can
|
|
7546
|
+
// calculate and include localSDPGenRemoteSDPRecv in the client event payload
|
|
7547
|
+
cdl.saveTimestamp({
|
|
7548
|
+
key: 'client.media-engine.remote-sdp-received',
|
|
7549
|
+
options: {meetingId: this.id},
|
|
7550
|
+
});
|
|
7551
|
+
|
|
7552
|
+
const localSDPGenRemoteSDPRecv = cdl.getLocalSDPGenRemoteSDPRecv();
|
|
7553
|
+
|
|
7545
7554
|
// @ts-ignore
|
|
7546
7555
|
this.webex.internal.newMetrics.submitClientEvent({
|
|
7547
7556
|
name: 'client.media-engine.remote-sdp-received',
|
|
7557
|
+
payload: {
|
|
7558
|
+
eventData: {
|
|
7559
|
+
localSDPGenRemoteSDPRecv,
|
|
7560
|
+
},
|
|
7561
|
+
},
|
|
7548
7562
|
options: {meetingId: this.id},
|
|
7549
7563
|
});
|
|
7550
7564
|
Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.ROAP_OFFER_TO_ANSWER_LATENCY, {
|
|
7551
7565
|
correlation_id: this.correlationId,
|
|
7552
|
-
latency:
|
|
7566
|
+
latency: localSDPGenRemoteSDPRecv,
|
|
7553
7567
|
meetingId: this.id,
|
|
7554
7568
|
});
|
|
7555
7569
|
|
|
@@ -892,7 +892,10 @@ describe('plugin-meetings', () => {
|
|
|
892
892
|
});
|
|
893
893
|
|
|
894
894
|
it('should transfer host using the current locus when the target member is in the current session', async () => {
|
|
895
|
-
sinon
|
|
895
|
+
sinon
|
|
896
|
+
.stub(meeting.members.membersCollection, 'get')
|
|
897
|
+
.withArgs(uuid2)
|
|
898
|
+
.returns({isInMeeting: true});
|
|
896
899
|
meeting.members.transferHostToMember = sinon.stub().resolves(test1);
|
|
897
900
|
|
|
898
901
|
await meeting.transfer(uuid2, false);
|
|
@@ -901,7 +904,10 @@ describe('plugin-meetings', () => {
|
|
|
901
904
|
});
|
|
902
905
|
|
|
903
906
|
it('should transfer host using breakout locus when the target member is joined in a breakout session', async () => {
|
|
904
|
-
sinon
|
|
907
|
+
sinon
|
|
908
|
+
.stub(meeting.members.membersCollection, 'get')
|
|
909
|
+
.withArgs(uuid2)
|
|
910
|
+
.returns({isInMeeting: false});
|
|
905
911
|
meeting.members.transferHostToMember = sinon.stub().resolves(test1);
|
|
906
912
|
meeting.breakouts.breakouts = {
|
|
907
913
|
models: [
|
|
@@ -927,7 +933,10 @@ describe('plugin-meetings', () => {
|
|
|
927
933
|
});
|
|
928
934
|
|
|
929
935
|
it('should not use breakout locus when the breakout member is not in meeting', async () => {
|
|
930
|
-
sinon
|
|
936
|
+
sinon
|
|
937
|
+
.stub(meeting.members.membersCollection, 'get')
|
|
938
|
+
.withArgs(uuid2)
|
|
939
|
+
.returns({isInMeeting: false});
|
|
931
940
|
meeting.members.transferHostToMember = sinon.stub().resolves(test1);
|
|
932
941
|
meeting.breakouts.breakouts = {
|
|
933
942
|
models: [
|
|
@@ -944,7 +953,12 @@ describe('plugin-meetings', () => {
|
|
|
944
953
|
|
|
945
954
|
await meeting.transfer(uuid2, false);
|
|
946
955
|
|
|
947
|
-
assert.calledOnceWithExactly(
|
|
956
|
+
assert.calledOnceWithExactly(
|
|
957
|
+
meeting.members.transferHostToMember,
|
|
958
|
+
uuid2,
|
|
959
|
+
false,
|
|
960
|
+
undefined
|
|
961
|
+
);
|
|
948
962
|
});
|
|
949
963
|
});
|
|
950
964
|
describe('#getMembers', () => {
|
|
@@ -1732,15 +1746,13 @@ describe('plugin-meetings', () => {
|
|
|
1732
1746
|
const icePhaseCallbacks = [];
|
|
1733
1747
|
const addMediaInternalResults = [];
|
|
1734
1748
|
|
|
1735
|
-
meeting.addMediaInternal = sinon
|
|
1736
|
-
|
|
1737
|
-
.callsFake((icePhaseCallback) => {
|
|
1738
|
-
const defer = new Defer();
|
|
1749
|
+
meeting.addMediaInternal = sinon.stub().callsFake((icePhaseCallback) => {
|
|
1750
|
+
const defer = new Defer();
|
|
1739
1751
|
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1752
|
+
icePhaseCallbacks.push(icePhaseCallback);
|
|
1753
|
+
addMediaInternalResults.push(defer);
|
|
1754
|
+
return defer.promise;
|
|
1755
|
+
});
|
|
1744
1756
|
|
|
1745
1757
|
const leaveStub = sinon.stub(meeting, 'leave').resolves();
|
|
1746
1758
|
|
|
@@ -1961,7 +1973,9 @@ describe('plugin-meetings', () => {
|
|
|
1961
1973
|
meeting.isMultistream = true;
|
|
1962
1974
|
const dtlsError = new AddMediaFailed({iceConnected: true, connectionType: 'UDP'});
|
|
1963
1975
|
|
|
1964
|
-
webex.meetings.reachability.isAnyClusterReachableViaProtocol = sinon
|
|
1976
|
+
webex.meetings.reachability.isAnyClusterReachableViaProtocol = sinon
|
|
1977
|
+
.stub()
|
|
1978
|
+
.resolves(true);
|
|
1965
1979
|
|
|
1966
1980
|
addMediaInternalStub.onFirstCall().rejects(dtlsError);
|
|
1967
1981
|
addMediaInternalStub.onSecondCall().resolves(test4);
|
|
@@ -2015,7 +2029,9 @@ describe('plugin-meetings', () => {
|
|
|
2015
2029
|
meeting.isMultistream = isMultistream;
|
|
2016
2030
|
return Promise.resolve(fakeJoinResult);
|
|
2017
2031
|
});
|
|
2018
|
-
webex.meetings.reachability.isAnyClusterReachableViaProtocol = sinon
|
|
2032
|
+
webex.meetings.reachability.isAnyClusterReachableViaProtocol = sinon
|
|
2033
|
+
.stub()
|
|
2034
|
+
.resolves(tlsReachable);
|
|
2019
2035
|
|
|
2020
2036
|
addMediaInternalStub.onFirstCall().rejects(prevError);
|
|
2021
2037
|
addMediaInternalStub.onSecondCall().resolves(test4);
|
|
@@ -2714,7 +2730,8 @@ describe('plugin-meetings', () => {
|
|
|
2714
2730
|
|
|
2715
2731
|
[
|
|
2716
2732
|
{
|
|
2717
|
-
title:
|
|
2733
|
+
title:
|
|
2734
|
+
'should skip a reaction when the default relay route does not match the LLM binding',
|
|
2718
2735
|
isPracticeSessionConnected: false,
|
|
2719
2736
|
route: 'wrong-default-route',
|
|
2720
2737
|
defaultBinding: 'default-route',
|
|
@@ -3533,7 +3550,6 @@ describe('plugin-meetings', () => {
|
|
|
3533
3550
|
});
|
|
3534
3551
|
});
|
|
3535
3552
|
|
|
3536
|
-
|
|
3537
3553
|
describe('#addMedia', () => {
|
|
3538
3554
|
const muteStateStub = {
|
|
3539
3555
|
handleClientRequest: sinon.stub().returns(Promise.resolve(true)),
|
|
@@ -4691,12 +4707,14 @@ describe('plugin-meetings', () => {
|
|
|
4691
4707
|
|
|
4692
4708
|
[
|
|
4693
4709
|
{
|
|
4694
|
-
title:
|
|
4710
|
+
title:
|
|
4711
|
+
'should drop iceTransportPolicy=relay when TURN discovery returns no turn server info',
|
|
4695
4712
|
turnServerInfo: undefined,
|
|
4696
4713
|
turnDiscoverySkippedReason: 'reachability',
|
|
4697
4714
|
},
|
|
4698
4715
|
{
|
|
4699
|
-
title:
|
|
4716
|
+
title:
|
|
4717
|
+
'should drop iceTransportPolicy=relay when TURN discovery returns turnServerInfo with empty urls',
|
|
4700
4718
|
turnServerInfo: {urls: [], username: 'u', password: 'p'},
|
|
4701
4719
|
turnDiscoverySkippedReason: undefined,
|
|
4702
4720
|
},
|
|
@@ -4719,9 +4737,9 @@ describe('plugin-meetings', () => {
|
|
|
4719
4737
|
const config = createMediaConnectionStub.firstCall.args[3];
|
|
4720
4738
|
assert.isUndefined(config.iceTransportPolicy);
|
|
4721
4739
|
|
|
4722
|
-
const successCall = Metrics.sendBehavioralMetric
|
|
4723
|
-
(
|
|
4724
|
-
|
|
4740
|
+
const successCall = Metrics.sendBehavioralMetric
|
|
4741
|
+
.getCalls()
|
|
4742
|
+
.find((call) => call.args[0] === BEHAVIORAL_METRICS.ADD_MEDIA_SUCCESS);
|
|
4725
4743
|
assert.isDefined(successCall);
|
|
4726
4744
|
assert.equal(successCall.args[1].iceTransportPolicy, 'all');
|
|
4727
4745
|
});
|
|
@@ -4729,46 +4747,48 @@ describe('plugin-meetings', () => {
|
|
|
4729
4747
|
|
|
4730
4748
|
it('should send ADD_MEDIA_SUCCESS metric with iceTransportPolicy=relay when relay is used', async () => {
|
|
4731
4749
|
meeting.roap.doTurnDiscovery = sinon.stub().returns({
|
|
4732
|
-
turnServerInfo: {
|
|
4750
|
+
turnServerInfo: {
|
|
4751
|
+
urls: ['turns:turn-server:443?transport=tcp'],
|
|
4752
|
+
username: 'u',
|
|
4753
|
+
password: 'p',
|
|
4754
|
+
},
|
|
4733
4755
|
turnDiscoverySkippedReason: undefined,
|
|
4734
4756
|
});
|
|
4735
4757
|
|
|
4736
|
-
await meeting.addMediaInternal(
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
undefined,
|
|
4740
|
-
'relay',
|
|
4741
|
-
{mediaSettings: {}}
|
|
4742
|
-
);
|
|
4758
|
+
await meeting.addMediaInternal(() => 'JOIN_MEETING_FINAL', false, undefined, 'relay', {
|
|
4759
|
+
mediaSettings: {},
|
|
4760
|
+
});
|
|
4743
4761
|
|
|
4744
|
-
const successCall = Metrics.sendBehavioralMetric
|
|
4745
|
-
(
|
|
4746
|
-
|
|
4762
|
+
const successCall = Metrics.sendBehavioralMetric
|
|
4763
|
+
.getCalls()
|
|
4764
|
+
.find((call) => call.args[0] === BEHAVIORAL_METRICS.ADD_MEDIA_SUCCESS);
|
|
4747
4765
|
assert.isDefined(successCall);
|
|
4748
4766
|
assert.equal(successCall.args[1].iceTransportPolicy, 'relay');
|
|
4749
4767
|
});
|
|
4750
4768
|
|
|
4751
4769
|
it('should send ADD_MEDIA_FAILURE metric with iceTransportPolicy=relay when relay attempt fails', async () => {
|
|
4752
4770
|
meeting.roap.doTurnDiscovery = sinon.stub().returns({
|
|
4753
|
-
turnServerInfo: {
|
|
4771
|
+
turnServerInfo: {
|
|
4772
|
+
urls: ['turns:turn-server:443?transport=tcp'],
|
|
4773
|
+
username: 'u',
|
|
4774
|
+
password: 'p',
|
|
4775
|
+
},
|
|
4754
4776
|
turnDiscoverySkippedReason: undefined,
|
|
4755
4777
|
});
|
|
4756
4778
|
|
|
4757
|
-
meeting.mediaProperties.waitForMediaConnectionConnected = sinon
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
await assert.isRejected(meeting.addMediaInternal(
|
|
4762
|
-
() => 'JOIN_MEETING_FINAL',
|
|
4763
|
-
false,
|
|
4764
|
-
undefined,
|
|
4765
|
-
'relay',
|
|
4766
|
-
{mediaSettings: {}}
|
|
4767
|
-
));
|
|
4779
|
+
meeting.mediaProperties.waitForMediaConnectionConnected = sinon
|
|
4780
|
+
.stub()
|
|
4781
|
+
.rejects(new MediaConnectionTimedOutError('timed out', true));
|
|
4768
4782
|
|
|
4769
|
-
|
|
4770
|
-
(
|
|
4783
|
+
await assert.isRejected(
|
|
4784
|
+
meeting.addMediaInternal(() => 'JOIN_MEETING_FINAL', false, undefined, 'relay', {
|
|
4785
|
+
mediaSettings: {},
|
|
4786
|
+
})
|
|
4771
4787
|
);
|
|
4788
|
+
|
|
4789
|
+
const failureCall = Metrics.sendBehavioralMetric
|
|
4790
|
+
.getCalls()
|
|
4791
|
+
.find((call) => call.args[0] === BEHAVIORAL_METRICS.ADD_MEDIA_FAILURE);
|
|
4772
4792
|
assert.isDefined(failureCall);
|
|
4773
4793
|
assert.equal(failureCall.args[1].iceTransportPolicy, 'relay');
|
|
4774
4794
|
});
|
|
@@ -10934,7 +10954,9 @@ describe('plugin-meetings', () => {
|
|
|
10934
10954
|
MediaCodecMimeType.OPUS,
|
|
10935
10955
|
['maxaveragebitrate', 'maxplaybackrate']
|
|
10936
10956
|
);
|
|
10937
|
-
assert.notCalled(
|
|
10957
|
+
assert.notCalled(
|
|
10958
|
+
meeting.sendSlotManager.getSlot(MediaType.AudioMain).setCustomCodecParameters
|
|
10959
|
+
);
|
|
10938
10960
|
});
|
|
10939
10961
|
});
|
|
10940
10962
|
|
|
@@ -11669,11 +11691,36 @@ describe('plugin-meetings', () => {
|
|
|
11669
11691
|
};
|
|
11670
11692
|
meeting.sdpResponseTimer = '1234';
|
|
11671
11693
|
|
|
11694
|
+
webex.internal.newMetrics.callDiagnosticLatencies.saveTimestamp = sinon.stub();
|
|
11695
|
+
webex.internal.newMetrics.callDiagnosticLatencies.getLocalSDPGenRemoteSDPRecv = sinon
|
|
11696
|
+
.stub()
|
|
11697
|
+
.returns(100);
|
|
11698
|
+
|
|
11672
11699
|
eventListeners[MediaConnectionEventNames.REMOTE_SDP_ANSWER_PROCESSED]();
|
|
11673
11700
|
|
|
11701
|
+
// the remote-sdp-received timestamp must be saved before the latency is computed
|
|
11702
|
+
// so that getLocalSDPGenRemoteSDPRecv() has an end timestamp to use
|
|
11703
|
+
assert.calledOnceWithExactly(
|
|
11704
|
+
webex.internal.newMetrics.callDiagnosticLatencies.saveTimestamp,
|
|
11705
|
+
{
|
|
11706
|
+
key: 'client.media-engine.remote-sdp-received',
|
|
11707
|
+
options: {meetingId: meeting.id},
|
|
11708
|
+
}
|
|
11709
|
+
);
|
|
11710
|
+
assert(
|
|
11711
|
+
webex.internal.newMetrics.callDiagnosticLatencies.saveTimestamp.calledBefore(
|
|
11712
|
+
webex.internal.newMetrics.callDiagnosticLatencies.getLocalSDPGenRemoteSDPRecv
|
|
11713
|
+
)
|
|
11714
|
+
);
|
|
11715
|
+
|
|
11674
11716
|
assert.calledOnce(webex.internal.newMetrics.submitClientEvent);
|
|
11675
11717
|
assert.calledWithMatch(webex.internal.newMetrics.submitClientEvent, {
|
|
11676
11718
|
name: 'client.media-engine.remote-sdp-received',
|
|
11719
|
+
payload: {
|
|
11720
|
+
eventData: {
|
|
11721
|
+
localSDPGenRemoteSDPRecv: 100,
|
|
11722
|
+
},
|
|
11723
|
+
},
|
|
11677
11724
|
options: {meetingId: meeting.id},
|
|
11678
11725
|
});
|
|
11679
11726
|
|
|
@@ -11684,7 +11731,7 @@ describe('plugin-meetings', () => {
|
|
|
11684
11731
|
{
|
|
11685
11732
|
correlation_id: meeting.correlationId,
|
|
11686
11733
|
meetingId: meeting.id,
|
|
11687
|
-
latency:
|
|
11734
|
+
latency: 100,
|
|
11688
11735
|
}
|
|
11689
11736
|
);
|
|
11690
11737
|
|
|
@@ -12094,11 +12141,11 @@ describe('plugin-meetings', () => {
|
|
|
12094
12141
|
meeting.updateLLMConnection = sinon.stub();
|
|
12095
12142
|
let resolvePrefetch;
|
|
12096
12143
|
|
|
12097
|
-
meeting.ensureDefaultDatachannelTokenAfterAdmit = sinon
|
|
12098
|
-
|
|
12099
|
-
.returns(new Promise((resolve) => {
|
|
12144
|
+
meeting.ensureDefaultDatachannelTokenAfterAdmit = sinon.stub().returns(
|
|
12145
|
+
new Promise((resolve) => {
|
|
12100
12146
|
resolvePrefetch = resolve;
|
|
12101
|
-
})
|
|
12147
|
+
})
|
|
12148
|
+
);
|
|
12102
12149
|
meeting.rtcMetrics = {
|
|
12103
12150
|
sendNextMetrics: sinon.stub(),
|
|
12104
12151
|
};
|
|
@@ -12672,34 +12719,42 @@ describe('plugin-meetings', () => {
|
|
|
12672
12719
|
},
|
|
12673
12720
|
];
|
|
12674
12721
|
|
|
12675
|
-
recordingTestCases.forEach(
|
|
12676
|
-
|
|
12677
|
-
|
|
12678
|
-
|
|
12722
|
+
recordingTestCases.forEach(
|
|
12723
|
+
({description, state, expectedEvent, expectedRecordingState}) => {
|
|
12724
|
+
it(`listens to CONTROLS_RECORDING_UPDATED - ${description}`, async () => {
|
|
12725
|
+
const modifiedBy = 'user-id-123';
|
|
12726
|
+
const lastModified = '2026-01-01T00:00:00Z';
|
|
12679
12727
|
|
|
12680
|
-
|
|
12681
|
-
|
|
12682
|
-
|
|
12683
|
-
|
|
12684
|
-
|
|
12728
|
+
await meeting.locusInfo.emitScoped(
|
|
12729
|
+
{function: 'test', file: 'test'},
|
|
12730
|
+
LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED,
|
|
12731
|
+
{
|
|
12732
|
+
state,
|
|
12733
|
+
modifiedBy,
|
|
12734
|
+
lastModified,
|
|
12735
|
+
modifiedByServiceAppName: undefined,
|
|
12736
|
+
modifiedByServiceAppId: undefined,
|
|
12737
|
+
}
|
|
12738
|
+
);
|
|
12685
12739
|
|
|
12686
|
-
|
|
12687
|
-
|
|
12688
|
-
|
|
12689
|
-
|
|
12690
|
-
|
|
12691
|
-
|
|
12692
|
-
|
|
12740
|
+
assert.deepEqual(meeting.recording, {
|
|
12741
|
+
state: expectedRecordingState,
|
|
12742
|
+
modifiedBy,
|
|
12743
|
+
lastModified,
|
|
12744
|
+
modifiedByServiceAppName: undefined,
|
|
12745
|
+
modifiedByServiceAppId: undefined,
|
|
12746
|
+
});
|
|
12693
12747
|
|
|
12694
|
-
|
|
12695
|
-
|
|
12696
|
-
|
|
12697
|
-
|
|
12698
|
-
|
|
12699
|
-
|
|
12700
|
-
|
|
12701
|
-
|
|
12702
|
-
|
|
12748
|
+
assert.calledWith(
|
|
12749
|
+
TriggerProxy.trigger,
|
|
12750
|
+
meeting,
|
|
12751
|
+
{file: 'meeting/index', function: 'setupLocusControlsListener'},
|
|
12752
|
+
expectedEvent,
|
|
12753
|
+
meeting.recording
|
|
12754
|
+
);
|
|
12755
|
+
});
|
|
12756
|
+
}
|
|
12757
|
+
);
|
|
12703
12758
|
|
|
12704
12759
|
it('listens to CONTROLS_RECORDING_UPDATED and includes modifiedByServiceAppName and modifiedByServiceAppId when present', async () => {
|
|
12705
12760
|
const modifiedBy = 'user-id-123';
|
|
@@ -12710,7 +12765,13 @@ describe('plugin-meetings', () => {
|
|
|
12710
12765
|
await meeting.locusInfo.emitScoped(
|
|
12711
12766
|
{function: 'test', file: 'test'},
|
|
12712
12767
|
LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED,
|
|
12713
|
-
{
|
|
12768
|
+
{
|
|
12769
|
+
state: RECORDING_STATE.RECORDING,
|
|
12770
|
+
modifiedBy,
|
|
12771
|
+
lastModified,
|
|
12772
|
+
modifiedByServiceAppName,
|
|
12773
|
+
modifiedByServiceAppId,
|
|
12774
|
+
}
|
|
12714
12775
|
);
|
|
12715
12776
|
|
|
12716
12777
|
assert.deepEqual(meeting.recording, {
|
|
@@ -14794,7 +14855,11 @@ describe('plugin-meetings', () => {
|
|
|
14794
14855
|
meeting.joinedWith = {state: 'any other state'};
|
|
14795
14856
|
webex.internal.llm.getLocusUrl.returns('a url');
|
|
14796
14857
|
|
|
14797
|
-
meeting.locusInfo = {
|
|
14858
|
+
meeting.locusInfo = {
|
|
14859
|
+
syncAllHashTreeDatasets: sinon.stub().resolves(),
|
|
14860
|
+
url: 'a url',
|
|
14861
|
+
info: {datachannelUrl: 'a datachannel url'},
|
|
14862
|
+
};
|
|
14798
14863
|
|
|
14799
14864
|
const result = await meeting.updateLLMConnection();
|
|
14800
14865
|
|
|
@@ -14843,7 +14908,11 @@ describe('plugin-meetings', () => {
|
|
|
14843
14908
|
});
|
|
14844
14909
|
it('connects if not already connected', async () => {
|
|
14845
14910
|
meeting.joinedWith = {state: 'JOINED'};
|
|
14846
|
-
meeting.locusInfo = {
|
|
14911
|
+
meeting.locusInfo = {
|
|
14912
|
+
syncAllHashTreeDatasets: sinon.stub().resolves(),
|
|
14913
|
+
url: 'a url',
|
|
14914
|
+
info: {datachannelUrl: 'a datachannel url'},
|
|
14915
|
+
};
|
|
14847
14916
|
|
|
14848
14917
|
const result = await meeting.updateLLMConnection();
|
|
14849
14918
|
|
|
@@ -14878,10 +14947,15 @@ describe('plugin-meetings', () => {
|
|
|
14878
14947
|
|
|
14879
14948
|
const result = await meeting.updateLLMConnection();
|
|
14880
14949
|
|
|
14881
|
-
assert.calledWithExactly(
|
|
14882
|
-
|
|
14883
|
-
|
|
14884
|
-
|
|
14950
|
+
assert.calledWithExactly(
|
|
14951
|
+
webex.internal.llm.disconnectLLM,
|
|
14952
|
+
{
|
|
14953
|
+
code: 3050,
|
|
14954
|
+
reason: 'done (permanent)',
|
|
14955
|
+
},
|
|
14956
|
+
'llm-default-session',
|
|
14957
|
+
meeting.id
|
|
14958
|
+
);
|
|
14885
14959
|
|
|
14886
14960
|
assert.calledWithExactly(
|
|
14887
14961
|
webex.internal.llm.registerAndConnect,
|
|
@@ -14932,10 +15006,15 @@ describe('plugin-meetings', () => {
|
|
|
14932
15006
|
|
|
14933
15007
|
const result = await meeting.updateLLMConnection();
|
|
14934
15008
|
|
|
14935
|
-
assert.calledWithExactly(
|
|
14936
|
-
|
|
14937
|
-
|
|
14938
|
-
|
|
15009
|
+
assert.calledWithExactly(
|
|
15010
|
+
webex.internal.llm.disconnectLLM,
|
|
15011
|
+
{
|
|
15012
|
+
code: 3050,
|
|
15013
|
+
reason: 'done (permanent)',
|
|
15014
|
+
},
|
|
15015
|
+
'llm-default-session',
|
|
15016
|
+
meeting.id
|
|
15017
|
+
);
|
|
14939
15018
|
|
|
14940
15019
|
assert.calledWithExactly(
|
|
14941
15020
|
webex.internal.llm.registerAndConnect,
|
|
@@ -14976,14 +15055,23 @@ describe('plugin-meetings', () => {
|
|
|
14976
15055
|
webex.internal.llm.isConnected.returns(true);
|
|
14977
15056
|
webex.internal.llm.getLocusUrl.returns('a url');
|
|
14978
15057
|
|
|
14979
|
-
meeting.locusInfo = {
|
|
15058
|
+
meeting.locusInfo = {
|
|
15059
|
+
syncAllHashTreeDatasets: sinon.stub().resolves(),
|
|
15060
|
+
url: 'a url',
|
|
15061
|
+
info: {datachannelUrl: 'a datachannel url'},
|
|
15062
|
+
};
|
|
14980
15063
|
|
|
14981
15064
|
const result = await meeting.updateLLMConnection();
|
|
14982
15065
|
|
|
14983
|
-
assert.calledWith(
|
|
14984
|
-
|
|
14985
|
-
|
|
14986
|
-
|
|
15066
|
+
assert.calledWith(
|
|
15067
|
+
webex.internal.llm.disconnectLLM,
|
|
15068
|
+
{
|
|
15069
|
+
code: 3050,
|
|
15070
|
+
reason: 'done (permanent)',
|
|
15071
|
+
},
|
|
15072
|
+
'llm-default-session',
|
|
15073
|
+
meeting.id
|
|
15074
|
+
);
|
|
14987
15075
|
assert.notCalled(webex.internal.llm.registerAndConnect);
|
|
14988
15076
|
assert.equal(result, undefined);
|
|
14989
15077
|
assert.isFalse(
|
|
@@ -15154,7 +15242,6 @@ describe('plugin-meetings', () => {
|
|
|
15154
15242
|
assert.notCalled(meeting.startLLMHealthCheckTimer);
|
|
15155
15243
|
});
|
|
15156
15244
|
|
|
15157
|
-
|
|
15158
15245
|
it('clears stale owner tag in cleanup finally block even when disconnectLLM rejects', async () => {
|
|
15159
15246
|
meeting.joinedWith = {state: 'JOINED'};
|
|
15160
15247
|
webex.internal.llm.isConnected.returns(true);
|
|
@@ -15222,10 +15309,15 @@ describe('plugin-meetings', () => {
|
|
|
15222
15309
|
|
|
15223
15310
|
await meeting.updateLLMConnection();
|
|
15224
15311
|
|
|
15225
|
-
assert.calledOnceWithExactly(
|
|
15226
|
-
|
|
15227
|
-
|
|
15228
|
-
|
|
15312
|
+
assert.calledOnceWithExactly(
|
|
15313
|
+
webex.internal.llm.disconnectLLM,
|
|
15314
|
+
{
|
|
15315
|
+
code: 3050,
|
|
15316
|
+
reason: 'done (permanent)',
|
|
15317
|
+
},
|
|
15318
|
+
'llm-default-session',
|
|
15319
|
+
meeting.id
|
|
15320
|
+
);
|
|
15229
15321
|
assert.calledWithExactly(
|
|
15230
15322
|
webex.internal.llm.registerAndConnect,
|
|
15231
15323
|
'a different url',
|
|
@@ -15245,7 +15337,11 @@ describe('plugin-meetings', () => {
|
|
|
15245
15337
|
meeting.joinedWith = {state: 'JOINED'};
|
|
15246
15338
|
webex.internal.llm.isConnected.returns(false);
|
|
15247
15339
|
webex.internal.llm.getOwnerMeetingId.returns(undefined);
|
|
15248
|
-
meeting.locusInfo = {
|
|
15340
|
+
meeting.locusInfo = {
|
|
15341
|
+
syncAllHashTreeDatasets: sinon.stub().resolves(),
|
|
15342
|
+
url: 'a url',
|
|
15343
|
+
info: {datachannelUrl: 'a datachannel url'},
|
|
15344
|
+
};
|
|
15249
15345
|
|
|
15250
15346
|
await meeting.updateLLMConnection();
|
|
15251
15347
|
|
|
@@ -15269,7 +15365,11 @@ describe('plugin-meetings', () => {
|
|
|
15269
15365
|
webex.internal.llm.getOwnerMeetingId.returns('stale-owner-id');
|
|
15270
15366
|
webex.internal.llm.getDatachannelToken.onFirstCall().returns(undefined);
|
|
15271
15367
|
webex.internal.llm.getDatachannelToken.onSecondCall().returns('recovered-token');
|
|
15272
|
-
meeting.locusInfo = {
|
|
15368
|
+
meeting.locusInfo = {
|
|
15369
|
+
syncAllHashTreeDatasets: sinon.stub().resolves(),
|
|
15370
|
+
url: 'a url',
|
|
15371
|
+
info: {datachannelUrl: 'a datachannel url'},
|
|
15372
|
+
};
|
|
15273
15373
|
|
|
15274
15374
|
await meeting.updateLLMConnection();
|
|
15275
15375
|
|
|
@@ -15321,10 +15421,15 @@ describe('plugin-meetings', () => {
|
|
|
15321
15421
|
it('disconnects llm and removes online and relay listeners during meeting data cleanup', async () => {
|
|
15322
15422
|
await meeting.clearMeetingData();
|
|
15323
15423
|
|
|
15324
|
-
assert.calledOnceWithExactly(
|
|
15325
|
-
|
|
15326
|
-
|
|
15327
|
-
|
|
15424
|
+
assert.calledOnceWithExactly(
|
|
15425
|
+
webex.internal.llm.disconnectLLM,
|
|
15426
|
+
{
|
|
15427
|
+
code: 3050,
|
|
15428
|
+
reason: 'done (permanent)',
|
|
15429
|
+
},
|
|
15430
|
+
'llm-default-session',
|
|
15431
|
+
meeting.id
|
|
15432
|
+
);
|
|
15328
15433
|
assert.calledWithExactly(webex.internal.llm.off, 'online', meeting.handleLLMOnline);
|
|
15329
15434
|
assert.calledWithExactly(
|
|
15330
15435
|
webex.internal.llm.off,
|
|
@@ -15403,10 +15508,15 @@ describe('plugin-meetings', () => {
|
|
|
15403
15508
|
|
|
15404
15509
|
await meeting.clearMeetingData();
|
|
15405
15510
|
|
|
15406
|
-
assert.calledOnceWithExactly(
|
|
15407
|
-
|
|
15408
|
-
|
|
15409
|
-
|
|
15511
|
+
assert.calledOnceWithExactly(
|
|
15512
|
+
webex.internal.llm.disconnectLLM,
|
|
15513
|
+
{
|
|
15514
|
+
code: 3050,
|
|
15515
|
+
reason: 'done (permanent)',
|
|
15516
|
+
},
|
|
15517
|
+
'llm-default-session',
|
|
15518
|
+
meeting.id
|
|
15519
|
+
);
|
|
15410
15520
|
assert.calledOnce(meeting.clearDataChannelToken);
|
|
15411
15521
|
});
|
|
15412
15522
|
|
|
@@ -15415,10 +15525,15 @@ describe('plugin-meetings', () => {
|
|
|
15415
15525
|
|
|
15416
15526
|
await meeting.clearMeetingData();
|
|
15417
15527
|
|
|
15418
|
-
assert.calledOnceWithExactly(
|
|
15419
|
-
|
|
15420
|
-
|
|
15421
|
-
|
|
15528
|
+
assert.calledOnceWithExactly(
|
|
15529
|
+
webex.internal.llm.disconnectLLM,
|
|
15530
|
+
{
|
|
15531
|
+
code: 3050,
|
|
15532
|
+
reason: 'done (permanent)',
|
|
15533
|
+
},
|
|
15534
|
+
'llm-default-session',
|
|
15535
|
+
meeting.id
|
|
15536
|
+
);
|
|
15422
15537
|
assert.calledOnce(meeting.clearDataChannelToken);
|
|
15423
15538
|
});
|
|
15424
15539
|
});
|
|
@@ -18455,4 +18570,4 @@ describe('plugin-meetings', () => {
|
|
|
18455
18570
|
assert.calledOnceWithExactly(meeting.meetingRequest.cancelSipCallOut, participantId);
|
|
18456
18571
|
});
|
|
18457
18572
|
});
|
|
18458
|
-
});
|
|
18573
|
+
});
|