@webex/plugin-meetings 3.12.0-next.113 → 3.12.0-next.114
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 +11 -14
- 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 -13
- package/test/unit/spec/meeting/index.js +60 -61
package/dist/webinar/index.js
CHANGED
package/package.json
CHANGED
package/src/meeting/index.ts
CHANGED
|
@@ -7543,14 +7543,21 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
7543
7543
|
// @ts-ignore
|
|
7544
7544
|
const cdl = this.webex.internal.newMetrics.callDiagnosticLatencies;
|
|
7545
7545
|
|
|
7546
|
-
//
|
|
7547
|
-
//
|
|
7548
|
-
|
|
7549
|
-
|
|
7550
|
-
|
|
7551
|
-
|
|
7552
|
-
|
|
7553
|
-
|
|
7546
|
+
// Compute the offer->answer latency from when the local SDP offer was generated up to now,
|
|
7547
|
+
// rather than from the stored remote-sdp-received timestamp. That stored timestamp uses
|
|
7548
|
+
// saveFirstTimestampOnly, so if waitForRemoteSDPAnswer() already timed out and submitted a
|
|
7549
|
+
// remote-sdp-received event, the stored value would be pinned to the timeout time and would
|
|
7550
|
+
// under-report an answer that arrives late. This handler fires exactly when the answer is
|
|
7551
|
+
// processed, so Date.now() is the accurate "received" time.
|
|
7552
|
+
// (submitClientEvent below still records the remote-sdp-received timestamp used by the CA
|
|
7553
|
+
// join-time metric, so we don't need to save it here.)
|
|
7554
|
+
const localSdpGeneratedTimestamp = cdl.latencyTimestamps.get(
|
|
7555
|
+
'client.media-engine.local-sdp-generated'
|
|
7556
|
+
);
|
|
7557
|
+
const localSDPGenRemoteSDPRecv =
|
|
7558
|
+
localSdpGeneratedTimestamp !== undefined
|
|
7559
|
+
? Date.now() - localSdpGeneratedTimestamp
|
|
7560
|
+
: undefined;
|
|
7554
7561
|
|
|
7555
7562
|
// @ts-ignore
|
|
7556
7563
|
this.webex.internal.newMetrics.submitClientEvent({
|
|
@@ -7562,11 +7569,6 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
7562
7569
|
},
|
|
7563
7570
|
options: {meetingId: this.id},
|
|
7564
7571
|
});
|
|
7565
|
-
Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.ROAP_OFFER_TO_ANSWER_LATENCY, {
|
|
7566
|
-
correlation_id: this.correlationId,
|
|
7567
|
-
latency: localSDPGenRemoteSDPRecv,
|
|
7568
|
-
meetingId: this.id,
|
|
7569
|
-
});
|
|
7570
7572
|
|
|
7571
7573
|
if (this.deferSDPAnswer) {
|
|
7572
7574
|
this.deferSDPAnswer.resolve();
|
|
@@ -2082,8 +2082,16 @@ describe('plugin-meetings', () => {
|
|
|
2082
2082
|
[
|
|
2083
2083
|
{description: '409 error from join()', statusCode: 409, useCause: false},
|
|
2084
2084
|
{description: '403 error from join()', statusCode: 403, useCause: false},
|
|
2085
|
-
{
|
|
2086
|
-
|
|
2085
|
+
{
|
|
2086
|
+
description: '409 error in cause (e.g. AddMediaFailed)',
|
|
2087
|
+
statusCode: 409,
|
|
2088
|
+
useCause: true,
|
|
2089
|
+
},
|
|
2090
|
+
{
|
|
2091
|
+
description: '403 error in cause (e.g. AddMediaFailed)',
|
|
2092
|
+
statusCode: 403,
|
|
2093
|
+
useCause: true,
|
|
2094
|
+
},
|
|
2087
2095
|
].forEach(({description, statusCode, useCause}) => {
|
|
2088
2096
|
it(`should re-join on retry when ${description}`, async () => {
|
|
2089
2097
|
const error = useCause
|
|
@@ -2099,7 +2107,11 @@ describe('plugin-meetings', () => {
|
|
|
2099
2107
|
|
|
2100
2108
|
const result = await meeting.joinWithMedia({joinOptions, mediaOptions});
|
|
2101
2109
|
|
|
2102
|
-
assert.deepEqual(result, {
|
|
2110
|
+
assert.deepEqual(result, {
|
|
2111
|
+
join: fakeJoinResult,
|
|
2112
|
+
media: test4,
|
|
2113
|
+
multistreamEnabled: true,
|
|
2114
|
+
});
|
|
2103
2115
|
|
|
2104
2116
|
// join() should be called twice — once for the first attempt, once for the re-join
|
|
2105
2117
|
assert.calledTwice(meeting.join);
|
|
@@ -2114,9 +2126,7 @@ describe('plugin-meetings', () => {
|
|
|
2114
2126
|
meeting.join = sinon.stub().callsFake(() => Promise.resolve(fakeJoinResult));
|
|
2115
2127
|
sinon.stub(meeting, 'leave').resolves();
|
|
2116
2128
|
|
|
2117
|
-
await assert.isRejected(
|
|
2118
|
-
meeting.joinWithMedia({joinOptions, mediaOptions})
|
|
2119
|
-
);
|
|
2129
|
+
await assert.isRejected(meeting.joinWithMedia({joinOptions, mediaOptions}));
|
|
2120
2130
|
|
|
2121
2131
|
// JOIN_WITH_MEDIA_RETRY_MAX_COUNT is 2, so we expect 3 attempts total (initial + 2 retries)
|
|
2122
2132
|
assert.callCount(meeting.join, 3);
|
|
@@ -11693,6 +11703,8 @@ describe('plugin-meetings', () => {
|
|
|
11693
11703
|
});
|
|
11694
11704
|
|
|
11695
11705
|
it('handles REMOTE_SDP_ANSWER_PROCESSED correctly', () => {
|
|
11706
|
+
// capture the start timestamp before any fake timers are installed
|
|
11707
|
+
const localSdpGeneratedTimestamp = Date.now() - 100;
|
|
11696
11708
|
const clock = sinon.useFakeTimers();
|
|
11697
11709
|
sinon.spy(clock, 'clearTimeout');
|
|
11698
11710
|
meeting.deferSDPAnswer = {
|
|
@@ -11700,49 +11712,29 @@ describe('plugin-meetings', () => {
|
|
|
11700
11712
|
};
|
|
11701
11713
|
meeting.sdpResponseTimer = '1234';
|
|
11702
11714
|
|
|
11703
|
-
|
|
11704
|
-
|
|
11705
|
-
|
|
11706
|
-
.
|
|
11715
|
+
// latency is computed as Date.now() - the stored local-sdp-generated timestamp,
|
|
11716
|
+
// so it is unaffected by any earlier remote-sdp-received timestamp saved on timeout
|
|
11717
|
+
webex.internal.newMetrics.callDiagnosticLatencies.latencyTimestamps = new Map([
|
|
11718
|
+
['client.media-engine.local-sdp-generated', localSdpGeneratedTimestamp],
|
|
11719
|
+
]);
|
|
11707
11720
|
|
|
11708
11721
|
eventListeners[MediaConnectionEventNames.REMOTE_SDP_ANSWER_PROCESSED]();
|
|
11709
11722
|
|
|
11710
|
-
// the remote-sdp-received timestamp must be saved before the latency is computed
|
|
11711
|
-
// so that getLocalSDPGenRemoteSDPRecv() has an end timestamp to use
|
|
11712
|
-
assert.calledOnceWithExactly(
|
|
11713
|
-
webex.internal.newMetrics.callDiagnosticLatencies.saveTimestamp,
|
|
11714
|
-
{
|
|
11715
|
-
key: 'client.media-engine.remote-sdp-received',
|
|
11716
|
-
options: {meetingId: meeting.id},
|
|
11717
|
-
}
|
|
11718
|
-
);
|
|
11719
|
-
assert(
|
|
11720
|
-
webex.internal.newMetrics.callDiagnosticLatencies.saveTimestamp.calledBefore(
|
|
11721
|
-
webex.internal.newMetrics.callDiagnosticLatencies.getLocalSDPGenRemoteSDPRecv
|
|
11722
|
-
)
|
|
11723
|
-
);
|
|
11724
|
-
|
|
11725
11723
|
assert.calledOnce(webex.internal.newMetrics.submitClientEvent);
|
|
11726
11724
|
assert.calledWithMatch(webex.internal.newMetrics.submitClientEvent, {
|
|
11727
11725
|
name: 'client.media-engine.remote-sdp-received',
|
|
11728
11726
|
payload: {
|
|
11729
11727
|
eventData: {
|
|
11730
|
-
localSDPGenRemoteSDPRecv:
|
|
11728
|
+
localSDPGenRemoteSDPRecv: sinon.match(
|
|
11729
|
+
(value) => typeof value === 'number' && value >= 100 && value < 5000
|
|
11730
|
+
),
|
|
11731
11731
|
},
|
|
11732
11732
|
},
|
|
11733
11733
|
options: {meetingId: meeting.id},
|
|
11734
11734
|
});
|
|
11735
11735
|
|
|
11736
|
-
|
|
11737
|
-
assert.
|
|
11738
|
-
Metrics.sendBehavioralMetric,
|
|
11739
|
-
BEHAVIORAL_METRICS.ROAP_OFFER_TO_ANSWER_LATENCY,
|
|
11740
|
-
{
|
|
11741
|
-
correlation_id: meeting.correlationId,
|
|
11742
|
-
meetingId: meeting.id,
|
|
11743
|
-
latency: 100,
|
|
11744
|
-
}
|
|
11745
|
-
);
|
|
11736
|
+
// the high-volume ROAP_OFFER_TO_ANSWER_LATENCY behavioral metric is no longer sent
|
|
11737
|
+
assert.notCalled(Metrics.sendBehavioralMetric);
|
|
11746
11738
|
|
|
11747
11739
|
assert.calledOnce(meeting.deferSDPAnswer.resolve);
|
|
11748
11740
|
assert.calledOnce(clock.clearTimeout);
|
|
@@ -11750,6 +11742,28 @@ describe('plugin-meetings', () => {
|
|
|
11750
11742
|
assert.equal(meeting.sdpResponseTimer, undefined);
|
|
11751
11743
|
});
|
|
11752
11744
|
|
|
11745
|
+
it('sends undefined localSDPGenRemoteSDPRecv when the local-sdp-generated timestamp is missing', () => {
|
|
11746
|
+
meeting.deferSDPAnswer = {
|
|
11747
|
+
resolve: sinon.stub(),
|
|
11748
|
+
};
|
|
11749
|
+
|
|
11750
|
+
// no local-sdp-generated timestamp stored -> latency cannot be computed
|
|
11751
|
+
webex.internal.newMetrics.callDiagnosticLatencies.latencyTimestamps = new Map();
|
|
11752
|
+
|
|
11753
|
+
eventListeners[MediaConnectionEventNames.REMOTE_SDP_ANSWER_PROCESSED]();
|
|
11754
|
+
|
|
11755
|
+
assert.calledOnce(webex.internal.newMetrics.submitClientEvent);
|
|
11756
|
+
assert.calledWithMatch(webex.internal.newMetrics.submitClientEvent, {
|
|
11757
|
+
name: 'client.media-engine.remote-sdp-received',
|
|
11758
|
+
payload: {
|
|
11759
|
+
eventData: {
|
|
11760
|
+
localSDPGenRemoteSDPRecv: undefined,
|
|
11761
|
+
},
|
|
11762
|
+
},
|
|
11763
|
+
options: {meetingId: meeting.id},
|
|
11764
|
+
});
|
|
11765
|
+
});
|
|
11766
|
+
|
|
11753
11767
|
it('handles LOCAL_SDP_OFFER_GENERATED correctly', () => {
|
|
11754
11768
|
assert.equal(meeting.deferSDPAnswer, undefined);
|
|
11755
11769
|
|
|
@@ -15570,11 +15584,7 @@ describe('plugin-meetings', () => {
|
|
|
15570
15584
|
// Only the client whose /sync request tracking id matches the tracking id echoed back on
|
|
15571
15585
|
// the top-level LLM event envelope records the LLM arrival; onLocusSyncLlmMessage is a
|
|
15572
15586
|
// no-op otherwise.
|
|
15573
|
-
assert.calledOnceWithExactly(
|
|
15574
|
-
meeting.onLocusSyncLlmMessage,
|
|
15575
|
-
meeting.id,
|
|
15576
|
-
event.trackingId
|
|
15577
|
-
);
|
|
15587
|
+
assert.calledOnceWithExactly(meeting.onLocusSyncLlmMessage, meeting.id, event.trackingId);
|
|
15578
15588
|
});
|
|
15579
15589
|
|
|
15580
15590
|
it('does not attempt sync completion when the tracking id is missing', () => {
|
|
@@ -15593,7 +15603,6 @@ describe('plugin-meetings', () => {
|
|
|
15593
15603
|
assert.calledOnceWithExactly(meeting.locusInfo.parse, meeting, event.data);
|
|
15594
15604
|
assert.notCalled(meeting.onLocusSyncLlmMessage);
|
|
15595
15605
|
});
|
|
15596
|
-
|
|
15597
15606
|
});
|
|
15598
15607
|
|
|
15599
15608
|
describe('#onLocusSyncLlmMessage', () => {
|
|
@@ -15640,11 +15649,7 @@ describe('plugin-meetings', () => {
|
|
|
15640
15649
|
'meeting-1',
|
|
15641
15650
|
'sync-tracking-id'
|
|
15642
15651
|
);
|
|
15643
|
-
assert.calledOnceWithExactly(
|
|
15644
|
-
meeting.emitLocusSyncCompleteMetric,
|
|
15645
|
-
'meeting-1',
|
|
15646
|
-
completed
|
|
15647
|
-
);
|
|
15652
|
+
assert.calledOnceWithExactly(meeting.emitLocusSyncCompleteMetric, 'meeting-1', completed);
|
|
15648
15653
|
});
|
|
15649
15654
|
|
|
15650
15655
|
it('does not emit when completion returns undefined (only one milestone is in)', () => {
|
|
@@ -15668,13 +15673,10 @@ describe('plugin-meetings', () => {
|
|
|
15668
15673
|
webex.internal.newMetrics.submitClientEvent.resetHistory();
|
|
15669
15674
|
webex.internal.llm.getWebSocketUrl = sinon.stub().returns('wss://llm-websocket-url');
|
|
15670
15675
|
|
|
15671
|
-
meeting.emitLocusSyncCompleteMetric(
|
|
15672
|
-
'
|
|
15673
|
-
{
|
|
15674
|
-
|
|
15675
|
-
syncLatency: {totalTime: 50},
|
|
15676
|
-
}
|
|
15677
|
-
);
|
|
15676
|
+
meeting.emitLocusSyncCompleteMetric('meeting-1', {
|
|
15677
|
+
dataSet: 'main',
|
|
15678
|
+
syncLatency: {totalTime: 50},
|
|
15679
|
+
});
|
|
15678
15680
|
|
|
15679
15681
|
assert.calledOnceWithExactly(webex.internal.newMetrics.submitClientEvent, {
|
|
15680
15682
|
name: 'client.locus.sync.complete',
|
|
@@ -15697,13 +15699,10 @@ describe('plugin-meetings', () => {
|
|
|
15697
15699
|
webex.internal.newMetrics.submitClientEvent.resetHistory();
|
|
15698
15700
|
webex.internal.llm.getWebSocketUrl = sinon.stub().returns(undefined);
|
|
15699
15701
|
|
|
15700
|
-
meeting.emitLocusSyncCompleteMetric(
|
|
15701
|
-
'
|
|
15702
|
-
{
|
|
15703
|
-
|
|
15704
|
-
syncLatency: {totalTime: 50},
|
|
15705
|
-
}
|
|
15706
|
-
);
|
|
15702
|
+
meeting.emitLocusSyncCompleteMetric('meeting-1', {
|
|
15703
|
+
dataSet: 'main',
|
|
15704
|
+
syncLatency: {totalTime: 50},
|
|
15705
|
+
});
|
|
15707
15706
|
|
|
15708
15707
|
assert.calledOnceWithExactly(webex.internal.newMetrics.submitClientEvent, {
|
|
15709
15708
|
name: 'client.locus.sync.complete',
|