@webex/plugin-meetings 3.12.0-llmrefactor.5 → 3.12.0-llmrefactor.7
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/hashTree/hashTreeParser.js +37 -29
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +4 -0
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/types.js +2 -1
- package/dist/locus-info/types.js.map +1 -1
- package/dist/meeting/index.js +13 -2
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/voicea-meeting.js +2 -1
- package/dist/meeting/voicea-meeting.js.map +1 -1
- package/dist/types/hashTree/hashTreeParser.d.ts +1 -0
- package/dist/types/locus-info/types.d.ts +1 -0
- package/dist/types/meeting/index.d.ts +1 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +9 -9
- package/src/hashTree/hashTreeParser.ts +17 -3
- package/src/locus-info/index.ts +1 -0
- package/src/locus-info/types.ts +1 -0
- package/src/meeting/index.ts +11 -3
- package/src/meeting/voicea-meeting.ts +1 -1
- package/test/unit/spec/breakouts/index.ts +12 -7
- package/test/unit/spec/hashTree/hashTreeParser.ts +64 -1
- package/test/unit/spec/locus-info/index.js +32 -0
- package/test/unit/spec/meeting/index.js +72 -0
- package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
|
@@ -131,7 +131,8 @@ var processNewCaptions = exports.processNewCaptions = function processNewCaption
|
|
|
131
131
|
}
|
|
132
132
|
interimTranscriptionIds.push(interimId);
|
|
133
133
|
} else {
|
|
134
|
-
|
|
134
|
+
var _transcriptData$inter;
|
|
135
|
+
((_transcriptData$inter = transcriptData.interimCaptions[transcriptId]) !== null && _transcriptData$inter !== void 0 ? _transcriptData$inter : []).forEach(function (innerInterimId) {
|
|
135
136
|
var interimTranscriptIndex = transcriptData.captions.findIndex(function (transcript) {
|
|
136
137
|
return transcript.id === innerInterimId;
|
|
137
138
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getSpeaker","exports","members","csis","arguments","length","undefined","_values","default","find","member","_member$participant$s","memberCSIs","participant","status","some","csi","includes","getSpeakerFromProxyOrStore","_ref","_meetingMember$partic","_meetingMember$partic2","csisKey","meetingMembers","transcriptData","speaker","speakerId","name","needsCaching","speakerProxy","meetingMember","person","id","processNewCaptions","_ref2","data","meeting","transcriptId","transcription","_data$transcripts","transcripts","transcriptsPerCsis","_map","_iterator","_createForOfIteratorHelper","_step","s","n","done","_transcriptsPerCsis$g","_transcriptsPerCsis$g2","transcript","value","text","currentSpokenLanguage","transcript_language_code","_transcript$csis","_slicedToArray2","csisMember","newCaption","concat","get","trim","set","_objectSpread","err","e","f","interimTranscriptionIds","_iterator2","_step2","_loop","_meeting$transcriptio","_meeting$transcriptio2","_meeting$transcriptio3","_meeting$transcriptio4","_data$transcripts$","_step2$value","key","_getSpeakerFromProxyO","membersCollection","interimId","captionData","isFinal","translations","currentCaptionLanguage","languageOptions","timestamp","interimTranscriptIndex","captions","findIndex","splice","push","interimCaptions","forEach","innerInterimId"],"sources":["voicea-meeting.ts"],"sourcesContent":["import {type MeetingTranscriptPayload} from '@webex/internal-plugin-voicea';\n\nexport const getSpeaker = (members, csis = []) =>\n Object.values(members).find((member: any) => {\n const memberCSIs = member.participant.status.csis ?? [];\n\n return csis.some((csi) => memberCSIs.includes(csi));\n });\n\nexport const getSpeakerFromProxyOrStore = ({csisKey, meetingMembers, transcriptData}) => {\n let speaker = {\n speakerId: '',\n name: '',\n };\n\n let needsCaching = false;\n\n if (csisKey && transcriptData.speakerProxy[csisKey]) {\n speaker = transcriptData.speakerProxy[csisKey];\n\n return {speaker, needsCaching};\n }\n\n const meetingMember: any = getSpeaker(meetingMembers, [csisKey]);\n\n speaker = {\n speakerId: meetingMember?.participant.person.id ?? '',\n name: meetingMember?.participant.person.name ?? '',\n };\n\n needsCaching = true;\n\n return {speaker, needsCaching};\n};\n\nexport const processNewCaptions = ({\n data,\n meeting,\n}: {\n data: MeetingTranscriptPayload;\n meeting: any;\n}) => {\n const {transcriptId} = data;\n const transcriptData = meeting.transcription;\n\n const {transcripts = []} = data;\n const transcriptsPerCsis = new Map();\n\n for (const transcript of transcripts) {\n const {\n text,\n transcript_language_code: currentSpokenLanguage,\n csis: [csisMember],\n } = transcript;\n\n const newCaption = `${transcriptsPerCsis.get(csisMember)?.text ?? ''} ${text}`.trim();\n\n transcriptsPerCsis.set(csisMember, {\n ...transcript,\n text: newCaption,\n currentSpokenLanguage,\n });\n }\n const interimTranscriptionIds = [];\n\n for (const [key, value] of transcriptsPerCsis) {\n const {needsCaching, speaker} = getSpeakerFromProxyOrStore({\n meetingMembers: meeting.members.membersCollection.members,\n transcriptData,\n csisKey: key,\n });\n const {speakerId} = speaker;\n const interimId = `${transcriptId}_${speakerId}`;\n\n if (needsCaching) {\n transcriptData.speakerProxy[key] = speaker;\n }\n\n const captionData = {\n id: interimId,\n isFinal: data.isFinal,\n translations: value.translations,\n text: value.text,\n currentCaptionLanguage:\n meeting.transcription?.languageOptions?.currentCaptionLanguage ||\n value.currentSpokenLanguage,\n currentSpokenLanguage:\n meeting.transcription?.languageOptions?.currentSpokenLanguage ||\n data.transcripts[0]?.transcript_language_code,\n timestamp: value?.timestamp,\n speaker,\n };\n\n if (!data.isFinal) {\n const interimTranscriptIndex = transcriptData.captions.findIndex(\n (transcript) => transcript.id === interimId\n );\n\n if (interimTranscriptIndex !== -1) {\n transcriptData.captions.splice(interimTranscriptIndex, 1);\n }\n\n interimTranscriptionIds.push(interimId);\n } else {\n transcriptData.interimCaptions[transcriptId].forEach((innerInterimId) => {\n const interimTranscriptIndex = transcriptData.captions.findIndex(\n (transcript) => transcript.id === innerInterimId\n );\n\n if (interimTranscriptIndex !== -1) {\n transcriptData.captions.splice(interimTranscriptIndex, 1);\n }\n });\n delete transcriptData.interimCaptions[transcriptId];\n captionData.id = transcriptId;\n }\n transcriptData.captions.push(captionData);\n }\n transcriptData.interimCaptions[transcriptId] = interimTranscriptionIds;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,IAAMA,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAG,SAAbA,UAAUA,CAAIE,OAAO;EAAA,IAAEC,IAAI,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAAA,OAC3C,IAAAG,OAAA,CAAAC,OAAA,EAAcN,OAAO,CAAC,CAACO,IAAI,CAAC,UAACC,MAAW,EAAK;IAAA,IAAAC,qBAAA;IAC3C,IAAMC,UAAU,IAAAD,qBAAA,GAAGD,MAAM,CAACG,WAAW,CAACC,MAAM,CAACX,IAAI,cAAAQ,qBAAA,cAAAA,qBAAA,GAAI,EAAE;IAEvD,OAAOR,IAAI,CAACY,IAAI,CAAC,UAACC,GAAG;MAAA,OAAKJ,UAAU,CAACK,QAAQ,CAACD,GAAG,CAAC;IAAA,EAAC;EACrD,CAAC,CAAC;AAAA;AAEG,IAAME,0BAA0B,GAAAjB,OAAA,CAAAiB,0BAAA,GAAG,SAA7BA,0BAA0BA,CAAAC,IAAA,EAAkD;EAAA,IAAAC,qBAAA,EAAAC,sBAAA;EAAA,IAA7CC,OAAO,GAAAH,IAAA,CAAPG,OAAO;IAAEC,cAAc,GAAAJ,IAAA,CAAdI,cAAc;IAAEC,cAAc,GAAAL,IAAA,CAAdK,cAAc;EACjF,IAAIC,OAAO,GAAG;IACZC,SAAS,EAAE,EAAE;IACbC,IAAI,EAAE;EACR,CAAC;EAED,IAAIC,YAAY,GAAG,KAAK;EAExB,IAAIN,OAAO,IAAIE,cAAc,CAACK,YAAY,CAACP,OAAO,CAAC,EAAE;IACnDG,OAAO,GAAGD,cAAc,CAACK,YAAY,CAACP,OAAO,CAAC;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,UAACvC,UAAU;UAAA,OAAKA,UAAU,CAACnB,EAAE,KAAKiD,SAAS;QAAA,CAC7C,CAAC;QAED,IAAIO,sBAAsB,KAAK,CAAC,CAAC,EAAE;UACjChE,cAAc,CAACiE,QAAQ,CAACE,MAAM,CAACH,sBAAsB,EAAE,CAAC,CAAC;QAC3D;QAEApB,uBAAuB,CAACwB,IAAI,CAACX,SAAS,CAAC;MACzC,CAAC,MAAM;QACLzD,cAAc,CAACqE,eAAe,CAACxD,YAAY,CAAC,CAACyD,OAAO,CAAC,UAACC,cAAc,EAAK;UACvE,IAAMP,sBAAsB,GAAGhE,cAAc,CAACiE,QAAQ,CAACC,SAAS,CAC9D,UAACvC,UAAU;YAAA,OAAKA,UAAU,CAACnB,EAAE,KAAK+D,cAAc;UAAA,CAClD,CAAC;UAED,IAAIP,sBAAsB,KAAK,CAAC,CAAC,EAAE;YACjChE,cAAc,CAACiE,QAAQ,CAACE,MAAM,CAACH,sBAAsB,EAAE,CAAC,CAAC;UAC3D;QACF,CAAC,CAAC;QACF,OAAOhE,cAAc,CAACqE,eAAe,CAACxD,YAAY,CAAC;QACnD6C,WAAW,CAAClD,EAAE,GAAGK,YAAY;MAC/B;MACAb,cAAc,CAACiE,QAAQ,CAACG,IAAI,CAACV,WAAW,CAAC;IAC3C,CAAC;IApDD,KAAAb,UAAA,CAAAvB,CAAA,MAAAwB,MAAA,GAAAD,UAAA,CAAAtB,CAAA,IAAAC,IAAA;MAAAuB,KAAA;IAAA;EAoDC,SAAAN,GAAA;IAAAI,UAAA,CAAAH,CAAA,CAAAD,GAAA;EAAA;IAAAI,UAAA,CAAAF,CAAA;EAAA;EACD3C,cAAc,CAACqE,eAAe,CAACxD,YAAY,CAAC,GAAG+B,uBAAuB;AACxE,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["getSpeaker","exports","members","csis","arguments","length","undefined","_values","default","find","member","_member$participant$s","memberCSIs","participant","status","some","csi","includes","getSpeakerFromProxyOrStore","_ref","_meetingMember$partic","_meetingMember$partic2","csisKey","meetingMembers","transcriptData","speaker","speakerId","name","needsCaching","speakerProxy","meetingMember","person","id","processNewCaptions","_ref2","data","meeting","transcriptId","transcription","_data$transcripts","transcripts","transcriptsPerCsis","_map","_iterator","_createForOfIteratorHelper","_step","s","n","done","_transcriptsPerCsis$g","_transcriptsPerCsis$g2","transcript","value","text","currentSpokenLanguage","transcript_language_code","_transcript$csis","_slicedToArray2","csisMember","newCaption","concat","get","trim","set","_objectSpread","err","e","f","interimTranscriptionIds","_iterator2","_step2","_loop","_meeting$transcriptio","_meeting$transcriptio2","_meeting$transcriptio3","_meeting$transcriptio4","_data$transcripts$","_step2$value","key","_getSpeakerFromProxyO","membersCollection","interimId","captionData","isFinal","translations","currentCaptionLanguage","languageOptions","timestamp","interimTranscriptIndex","captions","findIndex","splice","push","_transcriptData$inter","interimCaptions","forEach","innerInterimId"],"sources":["voicea-meeting.ts"],"sourcesContent":["import {type MeetingTranscriptPayload} from '@webex/internal-plugin-voicea';\n\nexport const getSpeaker = (members, csis = []) =>\n Object.values(members).find((member: any) => {\n const memberCSIs = member.participant.status.csis ?? [];\n\n return csis.some((csi) => memberCSIs.includes(csi));\n });\n\nexport const getSpeakerFromProxyOrStore = ({csisKey, meetingMembers, transcriptData}) => {\n let speaker = {\n speakerId: '',\n name: '',\n };\n\n let needsCaching = false;\n\n if (csisKey && transcriptData.speakerProxy[csisKey]) {\n speaker = transcriptData.speakerProxy[csisKey];\n\n return {speaker, needsCaching};\n }\n\n const meetingMember: any = getSpeaker(meetingMembers, [csisKey]);\n\n speaker = {\n speakerId: meetingMember?.participant.person.id ?? '',\n name: meetingMember?.participant.person.name ?? '',\n };\n\n needsCaching = true;\n\n return {speaker, needsCaching};\n};\n\nexport const processNewCaptions = ({\n data,\n meeting,\n}: {\n data: MeetingTranscriptPayload;\n meeting: any;\n}) => {\n const {transcriptId} = data;\n const transcriptData = meeting.transcription;\n\n const {transcripts = []} = data;\n const transcriptsPerCsis = new Map();\n\n for (const transcript of transcripts) {\n const {\n text,\n transcript_language_code: currentSpokenLanguage,\n csis: [csisMember],\n } = transcript;\n\n const newCaption = `${transcriptsPerCsis.get(csisMember)?.text ?? ''} ${text}`.trim();\n\n transcriptsPerCsis.set(csisMember, {\n ...transcript,\n text: newCaption,\n currentSpokenLanguage,\n });\n }\n const interimTranscriptionIds = [];\n\n for (const [key, value] of transcriptsPerCsis) {\n const {needsCaching, speaker} = getSpeakerFromProxyOrStore({\n meetingMembers: meeting.members.membersCollection.members,\n transcriptData,\n csisKey: key,\n });\n const {speakerId} = speaker;\n const interimId = `${transcriptId}_${speakerId}`;\n\n if (needsCaching) {\n transcriptData.speakerProxy[key] = speaker;\n }\n\n const captionData = {\n id: interimId,\n isFinal: data.isFinal,\n translations: value.translations,\n text: value.text,\n currentCaptionLanguage:\n meeting.transcription?.languageOptions?.currentCaptionLanguage ||\n value.currentSpokenLanguage,\n currentSpokenLanguage:\n meeting.transcription?.languageOptions?.currentSpokenLanguage ||\n data.transcripts[0]?.transcript_language_code,\n timestamp: value?.timestamp,\n speaker,\n };\n\n if (!data.isFinal) {\n const interimTranscriptIndex = transcriptData.captions.findIndex(\n (transcript) => transcript.id === interimId\n );\n\n if (interimTranscriptIndex !== -1) {\n transcriptData.captions.splice(interimTranscriptIndex, 1);\n }\n\n interimTranscriptionIds.push(interimId);\n } else {\n (transcriptData.interimCaptions[transcriptId] ?? []).forEach((innerInterimId) => {\n const interimTranscriptIndex = transcriptData.captions.findIndex(\n (transcript) => transcript.id === innerInterimId\n );\n\n if (interimTranscriptIndex !== -1) {\n transcriptData.captions.splice(interimTranscriptIndex, 1);\n }\n });\n delete transcriptData.interimCaptions[transcriptId];\n captionData.id = transcriptId;\n }\n transcriptData.captions.push(captionData);\n }\n transcriptData.interimCaptions[transcriptId] = interimTranscriptionIds;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,IAAMA,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAG,SAA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SAAS,CAAC;MACzC,CAAC,MAAM;QAAA,IAAAY,qBAAA;QACL,EAAAA,qBAAA,GAACrE,cAAc,CAACsE,eAAe,CAACzD,YAAY,CAAC,cAAAwD,qBAAA,cAAAA,qBAAA,GAAI,EAAE,EAAEE,OAAO,CAAC,UAACC,cAAc,EAAK;UAC/E,IAAMR,sBAAsB,GAAGhE,cAAc,CAACiE,QAAQ,CAACC,SAAS,CAC9D,UAACvC,UAAU;YAAA,OAAKA,UAAU,CAACnB,EAAE,KAAKgE,cAAc;UAAA,CAClD,CAAC;UAED,IAAIR,sBAAsB,KAAK,CAAC,CAAC,EAAE;YACjChE,cAAc,CAACiE,QAAQ,CAACE,MAAM,CAACH,sBAAsB,EAAE,CAAC,CAAC;UAC3D;QACF,CAAC,CAAC;QACF,OAAOhE,cAAc,CAACsE,eAAe,CAACzD,YAAY,CAAC;QACnD6C,WAAW,CAAClD,EAAE,GAAGK,YAAY;MAC/B;MACAb,cAAc,CAACiE,QAAQ,CAACG,IAAI,CAACV,WAAW,CAAC;IAC3C,CAAC;IApDD,KAAAb,UAAA,CAAAvB,CAAA,MAAAwB,MAAA,GAAAD,UAAA,CAAAtB,CAAA,IAAAC,IAAA;MAAAuB,KAAA;IAAA;EAoDC,SAAAN,GAAA;IAAAI,UAAA,CAAAH,CAAA,CAAAD,GAAA;EAAA;IAAAI,UAAA,CAAAF,CAAA;EAAA;EACD3C,cAAc,CAACsE,eAAe,CAACzD,YAAY,CAAC,GAAG+B,uBAAuB;AACxE,CAAC","ignoreList":[]}
|
|
@@ -88,6 +88,7 @@ export type HashTreeParserCallbacks = {
|
|
|
88
88
|
locusInfoUpdateCallback: LocusInfoUpdateCallback;
|
|
89
89
|
syncLatencyTracker?: SyncLatencyTracker;
|
|
90
90
|
generateTrackingId?: GenerateTrackingId;
|
|
91
|
+
isLlmExpected: () => boolean;
|
|
91
92
|
};
|
|
92
93
|
/**
|
|
93
94
|
* This error is thrown if we receive information that the meeting has ended while we're processing some hash messages.
|
|
@@ -1620,6 +1620,7 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
1620
1620
|
* @returns {boolean}
|
|
1621
1621
|
*/
|
|
1622
1622
|
private isErrorMeaningLocusDroppedUs;
|
|
1623
|
+
private isLocusUserFullError;
|
|
1623
1624
|
/**
|
|
1624
1625
|
* Determines if the next media attempt should use only TURN-TLS (iceTransportPolicy='relay').
|
|
1625
1626
|
* We do this in the hope that it will minimize the chance of Homer sending DTLS packets on a wrong
|
package/dist/webinar/index.js
CHANGED
package/package.json
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@webex/eslint-config-legacy": "0.0.0",
|
|
44
44
|
"@webex/jest-config-legacy": "0.0.0",
|
|
45
45
|
"@webex/legacy-tools": "0.0.0",
|
|
46
|
-
"@webex/plugin-rooms": "3.12.0-llmrefactor.
|
|
46
|
+
"@webex/plugin-rooms": "3.12.0-llmrefactor.5",
|
|
47
47
|
"@webex/test-helper-chai": "3.12.0-llmrefactor.2",
|
|
48
48
|
"@webex/test-helper-mocha": "3.12.0-llmrefactor.2",
|
|
49
49
|
"@webex/test-helper-mock-webex": "3.12.0-llmrefactor.1",
|
|
@@ -63,17 +63,17 @@
|
|
|
63
63
|
"@webex/common": "3.12.0-llmrefactor.2",
|
|
64
64
|
"@webex/event-dictionary-ts": "^1.0.2215",
|
|
65
65
|
"@webex/internal-media-core": "2.29.1",
|
|
66
|
-
"@webex/internal-plugin-conversation": "3.12.0-llmrefactor.
|
|
66
|
+
"@webex/internal-plugin-conversation": "3.12.0-llmrefactor.5",
|
|
67
67
|
"@webex/internal-plugin-device": "3.12.0-llmrefactor.3",
|
|
68
|
-
"@webex/internal-plugin-llm": "3.12.0-llmrefactor.
|
|
69
|
-
"@webex/internal-plugin-mercury": "3.12.0-llmrefactor.
|
|
68
|
+
"@webex/internal-plugin-llm": "3.12.0-llmrefactor.5",
|
|
69
|
+
"@webex/internal-plugin-mercury": "3.12.0-llmrefactor.5",
|
|
70
70
|
"@webex/internal-plugin-metrics": "3.12.0-llmrefactor.3",
|
|
71
|
-
"@webex/internal-plugin-support": "3.12.0-llmrefactor.
|
|
71
|
+
"@webex/internal-plugin-support": "3.12.0-llmrefactor.5",
|
|
72
72
|
"@webex/internal-plugin-user": "3.12.0-llmrefactor.3",
|
|
73
|
-
"@webex/internal-plugin-voicea": "3.12.0-llmrefactor.
|
|
73
|
+
"@webex/internal-plugin-voicea": "3.12.0-llmrefactor.5",
|
|
74
74
|
"@webex/media-helpers": "3.12.0-llmrefactor.3",
|
|
75
|
-
"@webex/plugin-people": "3.12.0-llmrefactor.
|
|
76
|
-
"@webex/plugin-rooms": "3.12.0-llmrefactor.
|
|
75
|
+
"@webex/plugin-people": "3.12.0-llmrefactor.5",
|
|
76
|
+
"@webex/plugin-rooms": "3.12.0-llmrefactor.5",
|
|
77
77
|
"@webex/ts-sdp": "^1.8.1",
|
|
78
78
|
"@webex/web-capabilities": "^1.13.0",
|
|
79
79
|
"@webex/webex-core": "3.12.0-llmrefactor.3",
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
"//": [
|
|
95
95
|
"TODO: upgrade jwt-decode when moving to node 18"
|
|
96
96
|
],
|
|
97
|
-
"version": "3.12.0-llmrefactor.
|
|
97
|
+
"version": "3.12.0-llmrefactor.7"
|
|
98
98
|
}
|
|
@@ -110,6 +110,7 @@ export type HashTreeParserCallbacks = {
|
|
|
110
110
|
locusInfoUpdateCallback: LocusInfoUpdateCallback;
|
|
111
111
|
syncLatencyTracker?: SyncLatencyTracker;
|
|
112
112
|
generateTrackingId?: GenerateTrackingId;
|
|
113
|
+
isLlmExpected: () => boolean;
|
|
113
114
|
};
|
|
114
115
|
|
|
115
116
|
const SYNC_METRICS_DATA_SETS = [
|
|
@@ -1222,11 +1223,11 @@ class HashTreeParser {
|
|
|
1222
1223
|
// emitted only from the LLM message path, so no completion happens here.
|
|
1223
1224
|
const updatedObjects = this.parseMessage(message, debugText);
|
|
1224
1225
|
|
|
1225
|
-
this.resetHeartbeatWatchdogs(message.dataSets);
|
|
1226
1226
|
this.callLocusInfoUpdateCallback({
|
|
1227
1227
|
updateType: LocusInfoUpdateType.OBJECTS_UPDATED,
|
|
1228
1228
|
updatedObjects,
|
|
1229
1229
|
});
|
|
1230
|
+
this.resetHeartbeatWatchdogs(message.dataSets);
|
|
1230
1231
|
}
|
|
1231
1232
|
}
|
|
1232
1233
|
|
|
@@ -1876,7 +1877,20 @@ class HashTreeParser {
|
|
|
1876
1877
|
// dataset-level heartbeatIntervalMs takes priority; fall back to top-level common value
|
|
1877
1878
|
const heartbeatIntervalMs = dataSet?.heartbeatIntervalMs ?? this.topLevelHeartbeatIntervalMs;
|
|
1878
1879
|
|
|
1879
|
-
if (!dataSet?.hashTree || !heartbeatIntervalMs) {
|
|
1880
|
+
if (!dataSet?.hashTree || !this.isVisibleDataSet(dataSet.name) || !heartbeatIntervalMs) {
|
|
1881
|
+
// eslint-disable-next-line no-continue
|
|
1882
|
+
continue;
|
|
1883
|
+
}
|
|
1884
|
+
|
|
1885
|
+
if (
|
|
1886
|
+
LLM_DATASET_NAMES.includes(dataSet.name) &&
|
|
1887
|
+
this.callbacks.isLlmExpected &&
|
|
1888
|
+
!this.callbacks.isLlmExpected()
|
|
1889
|
+
) {
|
|
1890
|
+
LoggerProxy.logger.info(
|
|
1891
|
+
`HashTreeParser#resetHeartbeatWatchdogs --> ${this.debugId} skipping heartbeat watchdog timer for data set "${dataSet.name}" because LLM is disconnected`
|
|
1892
|
+
);
|
|
1893
|
+
|
|
1880
1894
|
// eslint-disable-next-line no-continue
|
|
1881
1895
|
continue;
|
|
1882
1896
|
}
|
|
@@ -1888,7 +1902,7 @@ class HashTreeParser {
|
|
|
1888
1902
|
dataSet.heartbeatWatchdogTimer = undefined;
|
|
1889
1903
|
|
|
1890
1904
|
LoggerProxy.logger.warn(
|
|
1891
|
-
`HashTreeParser#resetHeartbeatWatchdogs --> ${this.debugId} Heartbeat watchdog fired for data set "${dataSet.name}" - no heartbeat received within expected interval, initiating sync`
|
|
1905
|
+
`HashTreeParser#resetHeartbeatWatchdogs --> ${this.debugId} Heartbeat watchdog fired for data set "${dataSet.name}" - no heartbeat received within expected interval(heartbeatIntervalMs=${heartbeatIntervalMs}, backoffTime=${backoffTime}), initiating sync`
|
|
1892
1906
|
);
|
|
1893
1907
|
|
|
1894
1908
|
Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.HASH_TREE_HEARTBEAT_WATCHDOG_EXPIRED, {
|
package/src/locus-info/index.ts
CHANGED
|
@@ -568,6 +568,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
568
568
|
callbacks: {
|
|
569
569
|
locusInfoUpdateCallback: this.updateFromHashTree.bind(this, locusUrl),
|
|
570
570
|
syncLatencyTracker: this.callbacks.syncLatencyTracker,
|
|
571
|
+
isLlmExpected: () => this.parsedLocus.self?.joinedWith?.state === 'JOINED',
|
|
571
572
|
// Reuse webex-core's tracking-id interceptor sequence (exposed publicly via
|
|
572
573
|
// webexTrackingIdSequenceNumbers) so Locus requests share the client's unified
|
|
573
574
|
// ${sessionId}_${sequence} tracking id space instead of minting an unrelated id. Fall
|
package/src/locus-info/types.ts
CHANGED
package/src/meeting/index.ts
CHANGED
|
@@ -186,7 +186,7 @@ import {ReachabilityMetrics} from '../reachability/reachability.types';
|
|
|
186
186
|
import {SetStageOptions, SetStageVideoLayout, UnsetStageVideoLayout} from './request.type';
|
|
187
187
|
import {Invitee} from './type';
|
|
188
188
|
import {DataSet, HashTreeMessage, Metadata} from '../hashTree/hashTreeParser';
|
|
189
|
-
import {LocusDTO} from '../locus-info/types';
|
|
189
|
+
import {LocusDTO, LocusErrorCodes} from '../locus-info/types';
|
|
190
190
|
import AIEnableRequest from '../aiEnableRequest';
|
|
191
191
|
|
|
192
192
|
// default callback so we don't call an undefined function, but in practice it should never be used
|
|
@@ -5874,10 +5874,12 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
5874
5874
|
|
|
5875
5875
|
if (
|
|
5876
5876
|
CallDiagnosticUtils.isSdpOfferCreationError(error) ||
|
|
5877
|
-
CallDiagnosticUtils.isWebrtcApiNotAvailableError(error)
|
|
5877
|
+
CallDiagnosticUtils.isWebrtcApiNotAvailableError(error) ||
|
|
5878
|
+
this.isLocusUserFullError(error)
|
|
5878
5879
|
) {
|
|
5879
5880
|
// errors related to offer creation (for example missing H264 codec) will happen again no matter how many times we try,
|
|
5880
5881
|
// so there is no point doing a retry
|
|
5882
|
+
// when the locus is full, we also don't want to retry, because it will just fail again
|
|
5881
5883
|
shouldRetry = false;
|
|
5882
5884
|
}
|
|
5883
5885
|
|
|
@@ -5943,7 +5945,9 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
5943
5945
|
|
|
5944
5946
|
this.locusInfo.suspendDestroyMeeting(false);
|
|
5945
5947
|
|
|
5946
|
-
|
|
5948
|
+
// LOCUS_USER_FULL is a definitive capacity error the client must surface, so it takes
|
|
5949
|
+
// precedence over any earlier retryable error stored in firstError.
|
|
5950
|
+
throw this.isLocusUserFullError(error) ? error : firstError ?? error;
|
|
5947
5951
|
}
|
|
5948
5952
|
}
|
|
5949
5953
|
|
|
@@ -8108,6 +8112,10 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
8108
8112
|
);
|
|
8109
8113
|
}
|
|
8110
8114
|
|
|
8115
|
+
private isLocusUserFullError(error: Error | undefined): boolean {
|
|
8116
|
+
return (error as any)?.error?.body?.errorCode === LocusErrorCodes.LOCUS_USER_FULL;
|
|
8117
|
+
}
|
|
8118
|
+
|
|
8111
8119
|
/**
|
|
8112
8120
|
* Determines if the next media attempt should use only TURN-TLS (iceTransportPolicy='relay').
|
|
8113
8121
|
* We do this in the hope that it will minimize the chance of Homer sending DTLS packets on a wrong
|
|
@@ -102,7 +102,7 @@ export const processNewCaptions = ({
|
|
|
102
102
|
|
|
103
103
|
interimTranscriptionIds.push(interimId);
|
|
104
104
|
} else {
|
|
105
|
-
transcriptData.interimCaptions[transcriptId].forEach((innerInterimId) => {
|
|
105
|
+
(transcriptData.interimCaptions[transcriptId] ?? []).forEach((innerInterimId) => {
|
|
106
106
|
const interimTranscriptIndex = transcriptData.captions.findIndex(
|
|
107
107
|
(transcript) => transcript.id === innerInterimId
|
|
108
108
|
);
|
|
@@ -799,20 +799,25 @@ describe('plugin-meetings', () => {
|
|
|
799
799
|
});
|
|
800
800
|
|
|
801
801
|
it('re-checks the subscription when the llm emits online', () => {
|
|
802
|
-
const onlineCall = webex.internal.llm.on
|
|
803
|
-
.getCalls()
|
|
804
|
-
.find((c) => c.args[0] === 'online');
|
|
802
|
+
const onlineCall = webex.internal.llm.on.getCalls().find((c) => c.args[0] === 'online');
|
|
805
803
|
assert.exists(onlineCall, 'expected an online listener to be registered');
|
|
806
804
|
const onlineHandler = onlineCall.args[1];
|
|
807
805
|
|
|
808
|
-
|
|
809
|
-
|
|
806
|
+
// Set up _llmChannel so listenToBroadcastMessages can subscribe
|
|
807
|
+
const mockChannel = {
|
|
808
|
+
isConnected: sinon.stub().returns(true),
|
|
809
|
+
on: sinon.stub(),
|
|
810
|
+
off: sinon.stub(),
|
|
811
|
+
};
|
|
812
|
+
breakouts._llmChannel = mockChannel;
|
|
813
|
+
|
|
814
|
+
const listenToSpy = sinon.spy(breakouts, 'listenTo');
|
|
810
815
|
|
|
811
816
|
onlineHandler.call(breakouts);
|
|
812
817
|
|
|
813
|
-
const call =
|
|
818
|
+
const call = listenToSpy
|
|
814
819
|
.getCalls()
|
|
815
|
-
.find((c) => c.args[0] === 'event:breakout.message');
|
|
820
|
+
.find((c) => c.args[0] === mockChannel && c.args[1] === 'event:breakout.message');
|
|
816
821
|
assert.exists(call, 'expected broadcast message subscription after online');
|
|
817
822
|
assert.isTrue(breakouts.hasSubscribedToMessage);
|
|
818
823
|
});
|
|
@@ -184,7 +184,8 @@ describe('HashTreeParser', () => {
|
|
|
184
184
|
excludedDataSets?: string[],
|
|
185
185
|
syncLatencyTracker?: any,
|
|
186
186
|
syncLatencyMeetingId = 'meeting-1',
|
|
187
|
-
generateTrackingId?: any
|
|
187
|
+
generateTrackingId?: any,
|
|
188
|
+
isLlmExpected?: () => boolean
|
|
188
189
|
) {
|
|
189
190
|
return new HashTreeParser({
|
|
190
191
|
initialLocus,
|
|
@@ -194,6 +195,7 @@ describe('HashTreeParser', () => {
|
|
|
194
195
|
locusInfoUpdateCallback: callback,
|
|
195
196
|
syncLatencyTracker,
|
|
196
197
|
generateTrackingId,
|
|
198
|
+
isLlmExpected,
|
|
197
199
|
},
|
|
198
200
|
debugId: 'test',
|
|
199
201
|
excludedDataSets,
|
|
@@ -3519,6 +3521,45 @@ describe('HashTreeParser', () => {
|
|
|
3519
3521
|
expect(parser.dataSets.main.heartbeatWatchdogTimer).to.be.undefined;
|
|
3520
3522
|
});
|
|
3521
3523
|
|
|
3524
|
+
it('skips watchdog timers for LLM datasets when current meeting LLM is not expected', async () => {
|
|
3525
|
+
const parser = createHashTreeParser(
|
|
3526
|
+
undefined,
|
|
3527
|
+
undefined,
|
|
3528
|
+
undefined,
|
|
3529
|
+
undefined,
|
|
3530
|
+
'meeting-1',
|
|
3531
|
+
undefined,
|
|
3532
|
+
() => false
|
|
3533
|
+
);
|
|
3534
|
+
|
|
3535
|
+
const heartbeatMessage = {
|
|
3536
|
+
dataSets: [
|
|
3537
|
+
{
|
|
3538
|
+
...createDataSet('main', 16, 1100),
|
|
3539
|
+
root: parser.dataSets.main.hashTree.getRootHash(),
|
|
3540
|
+
},
|
|
3541
|
+
{
|
|
3542
|
+
...createDataSet('self', 1, 2100),
|
|
3543
|
+
url: parser.dataSets.self.url,
|
|
3544
|
+
root: parser.dataSets.self.hashTree.getRootHash(),
|
|
3545
|
+
},
|
|
3546
|
+
{
|
|
3547
|
+
...createDataSet('atd-unmuted', 16, 3100),
|
|
3548
|
+
url: parser.dataSets['atd-unmuted'].url,
|
|
3549
|
+
root: parser.dataSets['atd-unmuted'].hashTree.getRootHash(),
|
|
3550
|
+
},
|
|
3551
|
+
],
|
|
3552
|
+
visibleDataSetsUrl,
|
|
3553
|
+
locusUrl,
|
|
3554
|
+
};
|
|
3555
|
+
|
|
3556
|
+
parser.handleMessage(heartbeatMessage, 'heartbeat with meeting-scoped llm not expected');
|
|
3557
|
+
|
|
3558
|
+
expect(parser.dataSets.main.heartbeatWatchdogTimer).to.be.undefined;
|
|
3559
|
+
expect(parser.dataSets['atd-unmuted'].heartbeatWatchdogTimer).to.be.undefined;
|
|
3560
|
+
expect(parser.dataSets.self.heartbeatWatchdogTimer).to.not.be.undefined;
|
|
3561
|
+
});
|
|
3562
|
+
|
|
3522
3563
|
it('stops all watchdog timers when meeting ends via sentinel message', async () => {
|
|
3523
3564
|
const parser = createHashTreeParser();
|
|
3524
3565
|
|
|
@@ -3679,6 +3720,28 @@ describe('HashTreeParser', () => {
|
|
|
3679
3720
|
expect(parser.dataSets['atd-active']?.heartbeatWatchdogTimer).to.be.undefined;
|
|
3680
3721
|
});
|
|
3681
3722
|
|
|
3723
|
+
it('does not set watchdog for a data set that has a hash tree but is not in visibleDataSets', async () => {
|
|
3724
|
+
const parser = createHashTreeParser();
|
|
3725
|
+
|
|
3726
|
+
// simulate a dataset that still has a hash tree but is no longer visible
|
|
3727
|
+
parser.visibleDataSets = parser.visibleDataSets.filter((vds) => vds.name !== 'main');
|
|
3728
|
+
|
|
3729
|
+
const heartbeatMessage = {
|
|
3730
|
+
dataSets: [
|
|
3731
|
+
{
|
|
3732
|
+
...createDataSet('main', 16, 1100),
|
|
3733
|
+
root: parser.dataSets.main.hashTree.getRootHash(),
|
|
3734
|
+
},
|
|
3735
|
+
],
|
|
3736
|
+
visibleDataSetsUrl,
|
|
3737
|
+
locusUrl,
|
|
3738
|
+
};
|
|
3739
|
+
|
|
3740
|
+
parser.handleMessage(heartbeatMessage, 'heartbeat for non-visible dataset with hash tree');
|
|
3741
|
+
|
|
3742
|
+
expect(parser.dataSets.main.heartbeatWatchdogTimer).to.be.undefined;
|
|
3743
|
+
});
|
|
3744
|
+
|
|
3682
3745
|
it('restarts the watchdog timer after it fires so that future missed heartbeats still trigger syncs', async () => {
|
|
3683
3746
|
const parser = createHashTreeParser();
|
|
3684
3747
|
const heartbeatIntervalMs = 5000;
|
|
@@ -195,6 +195,38 @@ describe('plugin-meetings', () => {
|
|
|
195
195
|
);
|
|
196
196
|
});
|
|
197
197
|
|
|
198
|
+
it('passes an isLlmExpected callback that is true when current device is joined', async () => {
|
|
199
|
+
locusInfo.parsedLocus.self = {
|
|
200
|
+
state: 'LEFT',
|
|
201
|
+
joinedWith: {state: 'JOINED'},
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
await locusInfo.initialSetup({
|
|
205
|
+
trigger: 'locus-message',
|
|
206
|
+
hashTreeMessage: createHashTreeMessage(['dataset1']),
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
const {isLlmExpected} = HashTreeParserStub.firstCall.args[0].callbacks;
|
|
210
|
+
|
|
211
|
+
assert.equal(isLlmExpected(), true);
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
it('passes an isLlmExpected callback that is false when self is joined but current device is not joined', async () => {
|
|
215
|
+
locusInfo.parsedLocus.self = {
|
|
216
|
+
state: 'JOINED',
|
|
217
|
+
joinedWith: {state: 'LEFT'},
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
await locusInfo.initialSetup({
|
|
221
|
+
trigger: 'locus-message',
|
|
222
|
+
hashTreeMessage: createHashTreeMessage(['dataset1']),
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
const {isLlmExpected} = HashTreeParserStub.firstCall.args[0].callbacks;
|
|
226
|
+
|
|
227
|
+
assert.equal(isLlmExpected(), false);
|
|
228
|
+
});
|
|
229
|
+
|
|
198
230
|
it('should not initialize the hash tree when triggered from a non-hash tree locus message', async () => {
|
|
199
231
|
const locus = {url: 'http://locus-url.com', participants: []};
|
|
200
232
|
|
|
@@ -1230,6 +1230,78 @@ describe('plugin-meetings', () => {
|
|
|
1230
1230
|
assert.calledWith(suspendDestroyMeetingStub.thirdCall, false);
|
|
1231
1231
|
});
|
|
1232
1232
|
|
|
1233
|
+
it('should not retry if join() fails because the Locus user capacity is full', async () => {
|
|
1234
|
+
const error = new Error('Error Joining Meeting');
|
|
1235
|
+
error.error = {
|
|
1236
|
+
statusCode: 423,
|
|
1237
|
+
body: {errorCode: 2423001},
|
|
1238
|
+
};
|
|
1239
|
+
meeting.join = sinon.stub().rejects(error);
|
|
1240
|
+
|
|
1241
|
+
const thrownError = await assert.isRejected(
|
|
1242
|
+
meeting.joinWithMedia({joinOptions, mediaOptions})
|
|
1243
|
+
);
|
|
1244
|
+
|
|
1245
|
+
assert.equal(thrownError, error);
|
|
1246
|
+
assert.calledOnce(meeting.join);
|
|
1247
|
+
assert.calledOnce(generateTurnDiscoveryRequestMessageStub);
|
|
1248
|
+
assert.calledOnce(Metrics.sendBehavioralMetric);
|
|
1249
|
+
assert.calledTwice(suspendDestroyMeetingStub);
|
|
1250
|
+
assert.calledWith(suspendDestroyMeetingStub.firstCall, true);
|
|
1251
|
+
assert.calledWith(suspendDestroyMeetingStub.secondCall, false);
|
|
1252
|
+
});
|
|
1253
|
+
|
|
1254
|
+
it('should still retry if join() fails with another HTTP 423 Locus error', async () => {
|
|
1255
|
+
const error = new Error('Error Joining Meeting');
|
|
1256
|
+
error.error = {
|
|
1257
|
+
statusCode: 423,
|
|
1258
|
+
body: {errorCode: 2423028},
|
|
1259
|
+
};
|
|
1260
|
+
meeting.join = sinon.stub().rejects(error);
|
|
1261
|
+
|
|
1262
|
+
const thrownError = await assert.isRejected(
|
|
1263
|
+
meeting.joinWithMedia({joinOptions, mediaOptions})
|
|
1264
|
+
);
|
|
1265
|
+
|
|
1266
|
+
assert.equal(thrownError, error);
|
|
1267
|
+
assert.calledTwice(meeting.join);
|
|
1268
|
+
assert.calledTwice(generateTurnDiscoveryRequestMessageStub);
|
|
1269
|
+
assert.calledTwice(Metrics.sendBehavioralMetric);
|
|
1270
|
+
});
|
|
1271
|
+
|
|
1272
|
+
it('should throw the Locus user full error over firstError when the retry hits full capacity', async () => {
|
|
1273
|
+
const firstJoinError = new Error('first join error');
|
|
1274
|
+
const capacityError = new Error('Error Joining Meeting');
|
|
1275
|
+
capacityError.error = {
|
|
1276
|
+
statusCode: 423,
|
|
1277
|
+
body: {errorCode: 2423001},
|
|
1278
|
+
};
|
|
1279
|
+
|
|
1280
|
+
meeting.join = sinon
|
|
1281
|
+
.stub()
|
|
1282
|
+
.onFirstCall()
|
|
1283
|
+
.rejects(firstJoinError)
|
|
1284
|
+
.onSecondCall()
|
|
1285
|
+
.rejects(capacityError);
|
|
1286
|
+
meeting.locusUrl = null; // join never succeeds
|
|
1287
|
+
|
|
1288
|
+
const thrownError = await assert.isRejected(
|
|
1289
|
+
meeting.joinWithMedia({joinOptions, mediaOptions})
|
|
1290
|
+
);
|
|
1291
|
+
|
|
1292
|
+
// join() runs once for the first attempt and once for the re-join
|
|
1293
|
+
assert.calledTwice(meeting.join);
|
|
1294
|
+
// the capacity error must take precedence over the stored firstError
|
|
1295
|
+
assert.equal(thrownError, capacityError);
|
|
1296
|
+
|
|
1297
|
+
assert.deepEqual(meeting.joinWithMediaRetryInfo, {
|
|
1298
|
+
retryCount: 0,
|
|
1299
|
+
prevJoinResponse: undefined,
|
|
1300
|
+
firstError: undefined,
|
|
1301
|
+
prevError: undefined,
|
|
1302
|
+
});
|
|
1303
|
+
});
|
|
1304
|
+
|
|
1233
1305
|
it('should re-join on retry when join() fails on first attempt, and throw the first error if join fails again', async () => {
|
|
1234
1306
|
const firstJoinError = new Error('first join error');
|
|
1235
1307
|
const secondJoinError = new Error('second join error');
|
|
@@ -150,6 +150,90 @@ describe('plugin-meetings', () => {
|
|
|
150
150
|
});
|
|
151
151
|
|
|
152
152
|
describe('processNewCaptions', () => {
|
|
153
|
+
const processCaptions = () => processNewCaptions({
|
|
154
|
+
data: fakeVoiceaPayload,
|
|
155
|
+
meeting: fakeMeeting
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
it('should process a final-only caption without an existing interim caption', () => {
|
|
159
|
+
const transcriptData = fakeMeeting.transcription;
|
|
160
|
+
const transcriptId = fakeVoiceaPayload.transcriptId;
|
|
161
|
+
|
|
162
|
+
delete transcriptData.interimCaptions[transcriptId];
|
|
163
|
+
|
|
164
|
+
assert.doesNotThrow(processCaptions);
|
|
165
|
+
|
|
166
|
+
const finalCaption = transcriptData.captions.find(caption => caption.id === transcriptId);
|
|
167
|
+
|
|
168
|
+
assert.exists(finalCaption);
|
|
169
|
+
assert.deepEqual(transcriptData.interimCaptions[transcriptId], []);
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
it('should process an interim caption received after a final caption', () => {
|
|
173
|
+
const transcriptData = fakeMeeting.transcription;
|
|
174
|
+
const transcriptId = fakeVoiceaPayload.transcriptId;
|
|
175
|
+
|
|
176
|
+
delete transcriptData.interimCaptions[transcriptId];
|
|
177
|
+
|
|
178
|
+
assert.doesNotThrow(processCaptions);
|
|
179
|
+
|
|
180
|
+
fakeVoiceaPayload.isFinal = false;
|
|
181
|
+
|
|
182
|
+
assert.doesNotThrow(processCaptions);
|
|
183
|
+
|
|
184
|
+
const speakerId = fakeMeeting.members.membersCollection.members[fakeMemberId].participant.person.id;
|
|
185
|
+
const interimId = `${transcriptId}_${speakerId}`;
|
|
186
|
+
|
|
187
|
+
assert.exists(transcriptData.captions.find(caption => caption.id === transcriptId));
|
|
188
|
+
assert.exists(transcriptData.captions.find(caption => caption.id === interimId));
|
|
189
|
+
assert.deepEqual(transcriptData.interimCaptions[transcriptId], [interimId]);
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
it('should process repeated final captions without throwing', () => {
|
|
193
|
+
const transcriptData = fakeMeeting.transcription;
|
|
194
|
+
const transcriptId = fakeVoiceaPayload.transcriptId;
|
|
195
|
+
|
|
196
|
+
delete transcriptData.interimCaptions[transcriptId];
|
|
197
|
+
|
|
198
|
+
assert.doesNotThrow(() => {
|
|
199
|
+
processCaptions();
|
|
200
|
+
processCaptions();
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
assert.exists(transcriptData.captions.find(caption => caption.id === transcriptId));
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
it('should process a final payload containing transcript entries for multiple CSIs without throwing', () => {
|
|
207
|
+
const transcriptData = fakeMeeting.transcription;
|
|
208
|
+
const transcriptId = fakeVoiceaPayload.transcriptId;
|
|
209
|
+
const firstCsi = 1234867712;
|
|
210
|
+
const secondCsi = 1234867713;
|
|
211
|
+
const secondCaptionText = 'Caption from a second CSI';
|
|
212
|
+
|
|
213
|
+
fakeVoiceaPayload.transcripts = [
|
|
214
|
+
{
|
|
215
|
+
...fakeVoiceaPayload.transcripts[0],
|
|
216
|
+
csis: [firstCsi]
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
text: secondCaptionText,
|
|
220
|
+
csis: [secondCsi],
|
|
221
|
+
transcript_language_code: 'en'
|
|
222
|
+
}
|
|
223
|
+
];
|
|
224
|
+
|
|
225
|
+
assert.doesNotThrow(processCaptions);
|
|
226
|
+
|
|
227
|
+
const finalCaptionTexts = transcriptData.captions
|
|
228
|
+
.filter(caption => caption.id === transcriptId)
|
|
229
|
+
.map(caption => caption.text);
|
|
230
|
+
|
|
231
|
+
assert.deepEqual(finalCaptionTexts, [
|
|
232
|
+
fakeVoiceaPayload.transcripts[0].text,
|
|
233
|
+
secondCaptionText
|
|
234
|
+
]);
|
|
235
|
+
});
|
|
236
|
+
|
|
153
237
|
it('should process new final captions correctly', () => {
|
|
154
238
|
let transcriptData = fakeMeeting.transcription;
|
|
155
239
|
let transcriptId = fakeVoiceaPayload.transcriptId;
|
|
@@ -254,4 +338,4 @@ describe('plugin-meetings', () => {
|
|
|
254
338
|
});
|
|
255
339
|
});
|
|
256
340
|
});
|
|
257
|
-
});
|
|
341
|
+
});
|