@webex/plugin-meetings 3.12.0-llmrefactor.1 → 3.12.0-llmrefactor.11
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/annotation/index.js +2 -2
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +5 -1
- package/dist/breakouts/index.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +101 -48
- 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 +27 -2
- 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 +139 -53
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/util.js +5 -1
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.js +2 -1
- package/dist/meeting/voicea-meeting.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +7 -1
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +44 -19
- package/dist/meetings/index.js.map +1 -1
- package/dist/types/hashTree/hashTreeParser.d.ts +12 -0
- package/dist/types/locus-info/index.d.ts +6 -0
- package/dist/types/locus-info/types.d.ts +1 -0
- package/dist/types/meeting/index.d.ts +9 -0
- package/dist/types/meeting/util.d.ts +3 -1
- package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
- package/dist/webinar/index.js +42 -25
- package/dist/webinar/index.js.map +1 -1
- package/package.json +21 -21
- package/src/annotation/index.ts +6 -4
- package/src/breakouts/index.ts +2 -0
- package/src/hashTree/hashTreeParser.ts +67 -3
- package/src/locus-info/index.ts +20 -0
- package/src/locus-info/types.ts +1 -0
- package/src/meeting/index.ts +122 -36
- package/src/meeting/util.ts +2 -2
- package/src/meeting/voicea-meeting.ts +1 -1
- package/src/meeting-info/meeting-info-v2.ts +6 -2
- package/src/meetings/index.ts +23 -8
- package/src/webinar/index.ts +19 -6
- package/test/unit/spec/annotation/index.ts +1 -1
- package/test/unit/spec/breakouts/index.ts +34 -0
- package/test/unit/spec/hashTree/hashTreeParser.ts +212 -1
- package/test/unit/spec/locus-info/index.js +79 -0
- package/test/unit/spec/meeting/index.js +396 -13
- package/test/unit/spec/meeting/utils.js +16 -2
- package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
- package/test/unit/spec/meeting-info/meetinginfov2.js +57 -0
- package/test/unit/spec/meetings/index.js +63 -19
- package/test/unit/spec/webinar/index.ts +48 -2
package/dist/locus-info/types.js
CHANGED
|
@@ -21,6 +21,7 @@ var EndMeetingReason = exports.EndMeetingReason = {
|
|
|
21
21
|
breakoutEnded: 'BREAKOUT_ENDED' // indicates that only a breakout session ended, not the whole meeting
|
|
22
22
|
};
|
|
23
23
|
var LocusErrorCodes = exports.LocusErrorCodes = {
|
|
24
|
-
LOCUS_INACTIVE: 2403004
|
|
24
|
+
LOCUS_INACTIVE: 2403004,
|
|
25
|
+
LOCUS_USER_FULL: 2423001
|
|
25
26
|
};
|
|
26
27
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["EndMeetingReason","exports","maxMeetingDuration","allParticipantsLeft","sipHostLeft","noHost","waitingForMpsEndMeetingTimeout","fraudDetection","meetingEndedByHost","meetingUpdated","meetingCancelled","autoEndWithSingleParticipant","breakoutEnded","LocusErrorCodes","LOCUS_INACTIVE"],"sources":["types.ts"],"sourcesContent":["import {Enum} from '../constants';\nimport {HtMeta} from '../hashTree/types';\n\nexport const EndMeetingReason = {\n maxMeetingDuration: 'MAX_MEETING_DURATION',\n allParticipantsLeft: 'ALL_PARTICIPANTS_LEFT',\n sipHostLeft: 'SIP_HOST_LEFT',\n noHost: 'NO_HOST',\n waitingForMpsEndMeetingTimeout: 'WAITING_FOR_MPS_END_MEETING_TIMEOUT',\n fraudDetection: 'FRAUD_DETECTION',\n meetingEndedByHost: 'MEETING_ENDED_BY_HOST',\n meetingUpdated: 'MEETING_UPDATED', // Locus code has comment about EndMeetingIfPossible reason for this one\n meetingCancelled: 'MEETING_CANCELLED', // Locus code has comment about EndMeetingIfPossible reason for this one\n autoEndWithSingleParticipant: 'AUTO_END_WITH_SINGLE_PARTICIPANT',\n breakoutEnded: 'BREAKOUT_ENDED', // indicates that only a breakout session ended, not the whole meeting\n} as const;\n\nexport type EndMeetingReason = Enum<typeof EndMeetingReason>;\n\nexport type LocusFullState = {\n active: boolean;\n count: number;\n lastActive: string;\n locked: boolean;\n sessionId: string;\n sessionIds: string[];\n startTime: number;\n state: string;\n type: string;\n endMeetingReason?: EndMeetingReason;\n};\n\nexport type Links = {\n services: Record<'breakout' | 'record', {url: string}>; // there exist also other services, but these are the ones we currently use\n resources: Record<'webcastInstance' | 'visibleDataSets', {url: string}>; // there exist also other resources, but these are the ones we currently use\n};\n\nexport type LocusDTO = {\n controls?: any;\n embeddedApps?: any[];\n fullState?: LocusFullState;\n host?: {\n id: string;\n incomingCallProtocols: any[];\n isExternal: boolean;\n name: string;\n orgId: string;\n };\n htMeta?: HtMeta;\n info?: any;\n jsSdkMeta?: {\n removedParticipantIds: string[]; // list of ids of participants that are removed in the last update\n forceReplaceMembers?: boolean; // when true, forces a full replacement of meeting members (e.g. when switching to a new hash tree parser - when moving between breakouts)\n };\n links?: Links;\n mediaShares?: any[];\n meetings?: any[];\n participants: any[];\n replaces?: any[];\n self?: any;\n sequence?: {\n dirtyParticipants: number;\n entries: number[];\n rangeEnd: number;\n rangeStart: number;\n sequenceHash: number;\n sessionToken: string;\n since: string;\n totalParticipants: number;\n };\n syncUrl?: string;\n url?: string;\n};\n\nexport type ReplacesInfo = {\n locusUrl: string;\n replacedAt: string;\n sessionId: string;\n};\n\nexport const LocusErrorCodes = {\n LOCUS_INACTIVE: 2403004,\n} as const;\n\nexport type LocusErrorCodes = Enum<typeof LocusErrorCodes>;\n"],"mappings":";;;;;;;AAGO,IAAMA,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG;EAC9BE,kBAAkB,EAAE,sBAAsB;EAC1CC,mBAAmB,EAAE,uBAAuB;EAC5CC,WAAW,EAAE,eAAe;EAC5BC,MAAM,EAAE,SAAS;EACjBC,8BAA8B,EAAE,qCAAqC;EACrEC,cAAc,EAAE,iBAAiB;EACjCC,kBAAkB,EAAE,uBAAuB;EAC3CC,cAAc,EAAE,iBAAiB;EAAE;EACnCC,gBAAgB,EAAE,mBAAmB;EAAE;EACvCC,4BAA4B,EAAE,kCAAkC;EAChEC,aAAa,EAAE,gBAAgB,CAAE;AACnC,CAAU;AAiEH,IAAMC,eAAe,GAAAZ,OAAA,CAAAY,eAAA,GAAG;EAC7BC,cAAc,EAAE;
|
|
1
|
+
{"version":3,"names":["EndMeetingReason","exports","maxMeetingDuration","allParticipantsLeft","sipHostLeft","noHost","waitingForMpsEndMeetingTimeout","fraudDetection","meetingEndedByHost","meetingUpdated","meetingCancelled","autoEndWithSingleParticipant","breakoutEnded","LocusErrorCodes","LOCUS_INACTIVE","LOCUS_USER_FULL"],"sources":["types.ts"],"sourcesContent":["import {Enum} from '../constants';\nimport {HtMeta} from '../hashTree/types';\n\nexport const EndMeetingReason = {\n maxMeetingDuration: 'MAX_MEETING_DURATION',\n allParticipantsLeft: 'ALL_PARTICIPANTS_LEFT',\n sipHostLeft: 'SIP_HOST_LEFT',\n noHost: 'NO_HOST',\n waitingForMpsEndMeetingTimeout: 'WAITING_FOR_MPS_END_MEETING_TIMEOUT',\n fraudDetection: 'FRAUD_DETECTION',\n meetingEndedByHost: 'MEETING_ENDED_BY_HOST',\n meetingUpdated: 'MEETING_UPDATED', // Locus code has comment about EndMeetingIfPossible reason for this one\n meetingCancelled: 'MEETING_CANCELLED', // Locus code has comment about EndMeetingIfPossible reason for this one\n autoEndWithSingleParticipant: 'AUTO_END_WITH_SINGLE_PARTICIPANT',\n breakoutEnded: 'BREAKOUT_ENDED', // indicates that only a breakout session ended, not the whole meeting\n} as const;\n\nexport type EndMeetingReason = Enum<typeof EndMeetingReason>;\n\nexport type LocusFullState = {\n active: boolean;\n count: number;\n lastActive: string;\n locked: boolean;\n sessionId: string;\n sessionIds: string[];\n startTime: number;\n state: string;\n type: string;\n endMeetingReason?: EndMeetingReason;\n};\n\nexport type Links = {\n services: Record<'breakout' | 'record', {url: string}>; // there exist also other services, but these are the ones we currently use\n resources: Record<'webcastInstance' | 'visibleDataSets', {url: string}>; // there exist also other resources, but these are the ones we currently use\n};\n\nexport type LocusDTO = {\n controls?: any;\n embeddedApps?: any[];\n fullState?: LocusFullState;\n host?: {\n id: string;\n incomingCallProtocols: any[];\n isExternal: boolean;\n name: string;\n orgId: string;\n };\n htMeta?: HtMeta;\n info?: any;\n jsSdkMeta?: {\n removedParticipantIds: string[]; // list of ids of participants that are removed in the last update\n forceReplaceMembers?: boolean; // when true, forces a full replacement of meeting members (e.g. when switching to a new hash tree parser - when moving between breakouts)\n };\n links?: Links;\n mediaShares?: any[];\n meetings?: any[];\n participants: any[];\n replaces?: any[];\n self?: any;\n sequence?: {\n dirtyParticipants: number;\n entries: number[];\n rangeEnd: number;\n rangeStart: number;\n sequenceHash: number;\n sessionToken: string;\n since: string;\n totalParticipants: number;\n };\n syncUrl?: string;\n url?: string;\n};\n\nexport type ReplacesInfo = {\n locusUrl: string;\n replacedAt: string;\n sessionId: string;\n};\n\nexport const LocusErrorCodes = {\n LOCUS_INACTIVE: 2403004,\n LOCUS_USER_FULL: 2423001,\n} as const;\n\nexport type LocusErrorCodes = Enum<typeof LocusErrorCodes>;\n"],"mappings":";;;;;;;AAGO,IAAMA,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG;EAC9BE,kBAAkB,EAAE,sBAAsB;EAC1CC,mBAAmB,EAAE,uBAAuB;EAC5CC,WAAW,EAAE,eAAe;EAC5BC,MAAM,EAAE,SAAS;EACjBC,8BAA8B,EAAE,qCAAqC;EACrEC,cAAc,EAAE,iBAAiB;EACjCC,kBAAkB,EAAE,uBAAuB;EAC3CC,cAAc,EAAE,iBAAiB;EAAE;EACnCC,gBAAgB,EAAE,mBAAmB;EAAE;EACvCC,4BAA4B,EAAE,kCAAkC;EAChEC,aAAa,EAAE,gBAAgB,CAAE;AACnC,CAAU;AAiEH,IAAMC,eAAe,GAAAZ,OAAA,CAAAY,eAAA,GAAG;EAC7BC,cAAc,EAAE,OAAO;EACvBC,eAAe,EAAE;AACnB,CAAU","ignoreList":[]}
|
package/dist/meeting/index.js
CHANGED
|
@@ -94,6 +94,7 @@ var _joinWebinarError = _interopRequireDefault(require("../common/errors/join-we
|
|
|
94
94
|
var _brbState = require("./brbState");
|
|
95
95
|
var _multistreamNotSupportedError = _interopRequireDefault(require("../common/errors/multistream-not-supported-error"));
|
|
96
96
|
var _joinForbiddenError = _interopRequireDefault(require("../common/errors/join-forbidden-error"));
|
|
97
|
+
var _types = require("../locus-info/types");
|
|
97
98
|
var _aiEnableRequest = _interopRequireDefault(require("../aiEnableRequest"));
|
|
98
99
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof _Symbol && r[_Symbol$iterator] || r["@@iterator"]; if (!t) { if (_Array$isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
99
100
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? _Array$from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
@@ -728,20 +729,32 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
728
729
|
*
|
|
729
730
|
* @param {Object} options
|
|
730
731
|
* @param {boolean} [options.throwOnError=true] rethrows disconnect errors when true
|
|
732
|
+
* @param {boolean} [options.preserveVoiceaChannel=false] when true, keeps voiceaChannel for switchLLMChannel() during reconnects
|
|
731
733
|
* @returns {Promise<void>}
|
|
732
734
|
*/
|
|
733
735
|
(0, _defineProperty3.default)(_this, "cleanupLLMConneciton", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
734
736
|
var _ref3,
|
|
735
737
|
_ref3$throwOnError,
|
|
736
738
|
throwOnError,
|
|
739
|
+
_ref3$preserveVoiceaC,
|
|
740
|
+
preserveVoiceaChannel,
|
|
741
|
+
_this$voiceaChannel,
|
|
737
742
|
_args = arguments,
|
|
738
743
|
_t;
|
|
739
744
|
return _regenerator.default.wrap(function (_context) {
|
|
740
745
|
while (1) switch (_context.prev = _context.next) {
|
|
741
746
|
case 0:
|
|
742
|
-
_ref3 = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref3$throwOnError = _ref3.throwOnError, throwOnError = _ref3$throwOnError === void 0 ? true : _ref3$throwOnError;
|
|
747
|
+
_ref3 = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref3$throwOnError = _ref3.throwOnError, throwOnError = _ref3$throwOnError === void 0 ? true : _ref3$throwOnError, _ref3$preserveVoiceaC = _ref3.preserveVoiceaChannel, preserveVoiceaChannel = _ref3$preserveVoiceaC === void 0 ? false : _ref3$preserveVoiceaC;
|
|
743
748
|
// Always clear the timer, even if there's no channel
|
|
744
749
|
_this.clearLLMHealthCheckTimer();
|
|
750
|
+
|
|
751
|
+
// Permanent cleanup must deregister voiceaChannel regardless of LLM presence.
|
|
752
|
+
// When a transient reconnect fails (LLM registration error), llmChannel is undefined
|
|
753
|
+
// but voiceaChannel may still exist with listeners attached to the old emitter.
|
|
754
|
+
if (!preserveVoiceaChannel) {
|
|
755
|
+
(_this$voiceaChannel = _this.voiceaChannel) === null || _this$voiceaChannel === void 0 ? void 0 : _this$voiceaChannel.deregisterEvents();
|
|
756
|
+
_this.voiceaChannel = undefined;
|
|
757
|
+
}
|
|
745
758
|
if (_this.llmChannel) {
|
|
746
759
|
_context.next = 1;
|
|
747
760
|
break;
|
|
@@ -1633,9 +1646,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1633
1646
|
// stopListeningForMeetingEvents() before /leave and /end so events
|
|
1634
1647
|
// received mid-teardown do not trigger Locus syncs.
|
|
1635
1648
|
// Token cleanup happens automatically when cleanupLLMConneciton destroys the channel.
|
|
1649
|
+
// A new voiceaChannel is created on the next join. In-session LLM reconnects and
|
|
1650
|
+
// practice-session transitions use their own cleanup paths and preserve the channel.
|
|
1636
1651
|
_context5.next = 1;
|
|
1637
1652
|
return _this.cleanupLLMConneciton({
|
|
1638
|
-
throwOnError: false
|
|
1653
|
+
throwOnError: false,
|
|
1654
|
+
preserveVoiceaChannel: false
|
|
1639
1655
|
});
|
|
1640
1656
|
case 1:
|
|
1641
1657
|
case "end":
|
|
@@ -1835,6 +1851,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1835
1851
|
}, {
|
|
1836
1852
|
parent: _this.webex
|
|
1837
1853
|
});
|
|
1854
|
+
/**
|
|
1855
|
+
* VoiceaChannel for transcription/captions. Created without llmChannel;
|
|
1856
|
+
* switchLLMChannel() is called in updateLLMConnection() when LLM connects.
|
|
1857
|
+
* @instance
|
|
1858
|
+
* @type {VoiceaChannel}
|
|
1859
|
+
* @public
|
|
1860
|
+
* @memberof Meeting
|
|
1861
|
+
*/
|
|
1862
|
+
// @ts-ignore - Fix type
|
|
1863
|
+
_this.voiceaChannel = _this.webex.internal.voicea.createChannel();
|
|
1838
1864
|
/**
|
|
1839
1865
|
* helper class for managing receive slots (for multistream media connections)
|
|
1840
1866
|
*/
|
|
@@ -2315,19 +2341,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2315
2341
|
* @private
|
|
2316
2342
|
* @memberof Meeting
|
|
2317
2343
|
*/
|
|
2318
|
-
_this.transcription =
|
|
2319
|
-
captions: [],
|
|
2320
|
-
isListening: false,
|
|
2321
|
-
commandText: '',
|
|
2322
|
-
languageOptions: {
|
|
2323
|
-
currentSpokenLanguage: 'en'
|
|
2324
|
-
},
|
|
2325
|
-
showCaptionBox: false,
|
|
2326
|
-
transcribingRequestStatus: 'INACTIVE',
|
|
2327
|
-
isCaptioning: false,
|
|
2328
|
-
interimCaptions: {},
|
|
2329
|
-
speakerProxy: {}
|
|
2330
|
-
};
|
|
2344
|
+
_this.transcription = _this.getInitialTranscription();
|
|
2331
2345
|
|
|
2332
2346
|
/**
|
|
2333
2347
|
* Password status. If it's PASSWORD_STATUS.REQUIRED then verifyPassword() needs to be called
|
|
@@ -2623,6 +2637,30 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2623
2637
|
*/
|
|
2624
2638
|
(0, _inherits2.default)(Meeting, _StatelessWebexPlugin);
|
|
2625
2639
|
return (0, _createClass2.default)(Meeting, [{
|
|
2640
|
+
key: "getInitialTranscription",
|
|
2641
|
+
value:
|
|
2642
|
+
/**
|
|
2643
|
+
* Returns the initial transcription object shape.
|
|
2644
|
+
* Used by constructor and reset paths to ensure consistent initialization.
|
|
2645
|
+
* @private
|
|
2646
|
+
* @returns {Transcription}
|
|
2647
|
+
*/
|
|
2648
|
+
function getInitialTranscription() {
|
|
2649
|
+
return {
|
|
2650
|
+
captions: [],
|
|
2651
|
+
isListening: false,
|
|
2652
|
+
commandText: '',
|
|
2653
|
+
languageOptions: {
|
|
2654
|
+
currentSpokenLanguage: 'en'
|
|
2655
|
+
},
|
|
2656
|
+
showCaptionBox: false,
|
|
2657
|
+
transcribingRequestStatus: 'INACTIVE',
|
|
2658
|
+
isCaptioning: false,
|
|
2659
|
+
interimCaptions: {},
|
|
2660
|
+
speakerProxy: {}
|
|
2661
|
+
};
|
|
2662
|
+
}
|
|
2663
|
+
}, {
|
|
2626
2664
|
key: "getIngressPayloadTypeCallback",
|
|
2627
2665
|
value: function getIngressPayloadTypeCallback(mediaType, codecMimeType) {
|
|
2628
2666
|
if (this.isMultistream) {
|
|
@@ -2925,7 +2963,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2925
2963
|
// @ts-ignore - config coming from registerPlugin
|
|
2926
2964
|
this.config.installedOrgID, this.locusId, extraParams, {
|
|
2927
2965
|
meetingId: this.id,
|
|
2928
|
-
sendCAevents: sendCAevents
|
|
2966
|
+
sendCAevents: sendCAevents,
|
|
2967
|
+
correlationId: this.correlationId
|
|
2929
2968
|
}, registrationId, null, classificationId);
|
|
2930
2969
|
case 2:
|
|
2931
2970
|
info = _context7.sent;
|
|
@@ -3798,27 +3837,32 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3798
3837
|
// user need to be joined to start the llm and receive transcription
|
|
3799
3838
|
if (_this12.isJoined()) {
|
|
3800
3839
|
// @ts-ignore - config coming from registerPlugin
|
|
3801
|
-
if (transcribing && !_this12.
|
|
3802
|
-
_this12
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3840
|
+
if (transcribing && !_this12.areVoiceaEventsSetup) {
|
|
3841
|
+
var _this12$voiceaChannel;
|
|
3842
|
+
if ((_this12$voiceaChannel = _this12.voiceaChannel) !== null && _this12$voiceaChannel !== void 0 && _this12$voiceaChannel.isLLMConnected()) {
|
|
3843
|
+
_this12.startTranscription();
|
|
3844
|
+
}
|
|
3845
|
+
} else if (!transcribing) {
|
|
3846
|
+
if (_this12.areVoiceaEventsSetup) {
|
|
3847
|
+
_triggerProxy.default.trigger(_this12, {
|
|
3848
|
+
file: 'meeting/index',
|
|
3849
|
+
function: 'setupLocusControlsListener'
|
|
3850
|
+
}, _constants.EVENT_TRIGGERS.MEETING_STOPPED_RECEIVING_TRANSCRIPTION, {
|
|
3851
|
+
caption: caption,
|
|
3852
|
+
transcribing: transcribing
|
|
3853
|
+
});
|
|
3854
|
+
}
|
|
3811
3855
|
}
|
|
3812
3856
|
}
|
|
3813
3857
|
});
|
|
3814
3858
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_TRANSCRIPTION_SPOKEN_LANGUAGE_UPDATED, function (_ref13) {
|
|
3815
3859
|
var spokenLanguage = _ref13.spokenLanguage;
|
|
3816
3860
|
if (spokenLanguage) {
|
|
3817
|
-
var _this12$transcription, _this12$
|
|
3861
|
+
var _this12$transcription, _this12$voiceaChannel2;
|
|
3818
3862
|
if ((_this12$transcription = _this12.transcription) !== null && _this12$transcription !== void 0 && _this12$transcription.languageOptions) {
|
|
3819
3863
|
_this12.transcription.languageOptions.currentSpokenLanguage = spokenLanguage;
|
|
3820
3864
|
}
|
|
3821
|
-
(_this12$
|
|
3865
|
+
(_this12$voiceaChannel2 = _this12.voiceaChannel) === null || _this12$voiceaChannel2 === void 0 ? void 0 : _this12$voiceaChannel2.onSpokenLanguageUpdate(spokenLanguage, _this12.id);
|
|
3822
3866
|
_triggerProxy.default.trigger(_this12, {
|
|
3823
3867
|
file: 'meeting/index',
|
|
3824
3868
|
function: 'setupLocusControlsListener'
|
|
@@ -3840,8 +3884,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3840
3884
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_HESIOD_LLM_ID_UPDATED, function (_ref15) {
|
|
3841
3885
|
var hesiodLlmId = _ref15.hesiodLlmId;
|
|
3842
3886
|
if (hesiodLlmId) {
|
|
3843
|
-
var _this12$
|
|
3844
|
-
(_this12$
|
|
3887
|
+
var _this12$voiceaChannel3;
|
|
3888
|
+
(_this12$voiceaChannel3 = _this12.voiceaChannel) === null || _this12$voiceaChannel3 === void 0 ? void 0 : _this12$voiceaChannel3.onCaptionServiceIdUpdate(hesiodLlmId);
|
|
3845
3889
|
}
|
|
3846
3890
|
});
|
|
3847
3891
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_BREAKOUT_UPDATED, function (_ref16) {
|
|
@@ -6463,9 +6507,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6463
6507
|
|
|
6464
6508
|
// let's do a retry (but not on 1-1 calls, because the flow would get too complicated)
|
|
6465
6509
|
shouldRetry = !_util3.default.isOneOnOneCall(this.locusInfo.parsedLocus) && (retryCount < 1 || (_t10 instanceof _webexErrors.UserNotJoinedError || this.isErrorMeaningLocusDroppedUs(_t10)) && retryCount < JOIN_WITH_MEDIA_RETRY_MAX_COUNT);
|
|
6466
|
-
if (_internalPluginMetrics.CallDiagnosticUtils.isSdpOfferCreationError(_t10) || _internalPluginMetrics.CallDiagnosticUtils.isWebrtcApiNotAvailableError(_t10)) {
|
|
6510
|
+
if (_internalPluginMetrics.CallDiagnosticUtils.isSdpOfferCreationError(_t10) || _internalPluginMetrics.CallDiagnosticUtils.isWebrtcApiNotAvailableError(_t10) || this.isLocusUserFullError(_t10)) {
|
|
6467
6511
|
// errors related to offer creation (for example missing H264 codec) will happen again no matter how many times we try,
|
|
6468
6512
|
// so there is no point doing a retry
|
|
6513
|
+
// when the locus is full, we also don't want to retry, because it will just fail again
|
|
6469
6514
|
shouldRetry = false;
|
|
6470
6515
|
}
|
|
6471
6516
|
if (_internalPluginMetrics.CallDiagnosticUtils.isBrowserMediaError(_t10)) {
|
|
@@ -6534,7 +6579,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6534
6579
|
prevError: undefined
|
|
6535
6580
|
};
|
|
6536
6581
|
this.locusInfo.suspendDestroyMeeting(false);
|
|
6537
|
-
|
|
6582
|
+
|
|
6583
|
+
// LOCUS_USER_FULL is a definitive capacity error the client must surface, so it takes
|
|
6584
|
+
// precedence over any earlier retryable error stored in firstError.
|
|
6585
|
+
throw this.isLocusUserFullError(_t10) ? _t10 : firstError !== null && firstError !== void 0 ? firstError : _t10;
|
|
6538
6586
|
case 18:
|
|
6539
6587
|
case "end":
|
|
6540
6588
|
return _context17.stop();
|
|
@@ -6770,7 +6818,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6770
6818
|
return _startTranscription.apply(this, arguments);
|
|
6771
6819
|
}
|
|
6772
6820
|
return startTranscription;
|
|
6773
|
-
}()
|
|
6821
|
+
}()
|
|
6822
|
+
/**
|
|
6823
|
+
* Starts transcription when requested by the current Locus controls and an
|
|
6824
|
+
* active LLM channel is ready.
|
|
6825
|
+
* @internal
|
|
6826
|
+
* @returns {void}
|
|
6827
|
+
*/
|
|
6828
|
+
)
|
|
6829
|
+
}, {
|
|
6830
|
+
key: "startTranscriptionIfNeeded",
|
|
6831
|
+
value: function startTranscriptionIfNeeded() {
|
|
6832
|
+
var _this$locusInfo$contr2, _this$locusInfo$contr3, _this$voiceaChannel2;
|
|
6833
|
+
if ((_this$locusInfo$contr2 = this.locusInfo.controls) !== null && _this$locusInfo$contr2 !== void 0 && (_this$locusInfo$contr3 = _this$locusInfo$contr2.transcribe) !== null && _this$locusInfo$contr3 !== void 0 && _this$locusInfo$contr3.transcribing && !this.areVoiceaEventsSetup && (_this$voiceaChannel2 = this.voiceaChannel) !== null && _this$voiceaChannel2 !== void 0 && _this$voiceaChannel2.isLLMConnected()) {
|
|
6834
|
+
this.startTranscription();
|
|
6835
|
+
}
|
|
6836
|
+
}
|
|
6774
6837
|
}, {
|
|
6775
6838
|
key: "isRelayEventRouteValid",
|
|
6776
6839
|
value:
|
|
@@ -6805,12 +6868,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6805
6868
|
* @returns {void}
|
|
6806
6869
|
*/
|
|
6807
6870
|
function stopTranscription() {
|
|
6808
|
-
var _this$
|
|
6809
|
-
(_this$
|
|
6810
|
-
(_this$
|
|
6811
|
-
(_this$
|
|
6812
|
-
(_this$
|
|
6813
|
-
(_this$
|
|
6871
|
+
var _this$voiceaChannel3, _this$voiceaChannel4, _this$voiceaChannel5, _this$voiceaChannel6, _this$voiceaChannel7;
|
|
6872
|
+
(_this$voiceaChannel3 = this.voiceaChannel) === null || _this$voiceaChannel3 === void 0 ? void 0 : _this$voiceaChannel3.off(_internalPluginVoicea.EVENT_TRIGGERS.VOICEA_ANNOUNCEMENT, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.VOICEA_ANNOUNCEMENT]);
|
|
6873
|
+
(_this$voiceaChannel4 = this.voiceaChannel) === null || _this$voiceaChannel4 === void 0 ? void 0 : _this$voiceaChannel4.off(_internalPluginVoicea.EVENT_TRIGGERS.CAPTIONS_TURNED_ON, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.CAPTIONS_TURNED_ON]);
|
|
6874
|
+
(_this$voiceaChannel5 = this.voiceaChannel) === null || _this$voiceaChannel5 === void 0 ? void 0 : _this$voiceaChannel5.off(_internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND]);
|
|
6875
|
+
(_this$voiceaChannel6 = this.voiceaChannel) === null || _this$voiceaChannel6 === void 0 ? void 0 : _this$voiceaChannel6.off(_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION]);
|
|
6876
|
+
(_this$voiceaChannel7 = this.voiceaChannel) === null || _this$voiceaChannel7 === void 0 ? void 0 : _this$voiceaChannel7.deregisterEvents();
|
|
6814
6877
|
this.areVoiceaEventsSetup = false;
|
|
6815
6878
|
this.triggerStopReceivingTranscriptionEvent();
|
|
6816
6879
|
}
|
|
@@ -6839,12 +6902,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6839
6902
|
key: "restoreLLMSubscriptionsIfNeeded",
|
|
6840
6903
|
value: function restoreLLMSubscriptionsIfNeeded() {
|
|
6841
6904
|
try {
|
|
6842
|
-
var _this$
|
|
6843
|
-
var keepTranscriptionSubscribed = (_this$
|
|
6905
|
+
var _this$voiceaChannel8, _this$voiceaChannel9;
|
|
6906
|
+
var keepTranscriptionSubscribed = (_this$voiceaChannel8 = this.voiceaChannel) === null || _this$voiceaChannel8 === void 0 ? void 0 : _this$voiceaChannel8.getKeepTranscriptionSubscribed();
|
|
6844
6907
|
if (!keepTranscriptionSubscribed) {
|
|
6845
6908
|
return;
|
|
6846
6909
|
}
|
|
6847
|
-
(_this$
|
|
6910
|
+
(_this$voiceaChannel9 = this.voiceaChannel) === null || _this$voiceaChannel9 === void 0 ? void 0 : _this$voiceaChannel9.updateSubchannelSubscriptions({
|
|
6848
6911
|
subscribe: ['transcription']
|
|
6849
6912
|
});
|
|
6850
6913
|
} catch (error) {
|
|
@@ -7136,13 +7199,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7136
7199
|
}, {
|
|
7137
7200
|
key: "stopListeningForLLMEvents",
|
|
7138
7201
|
value: function stopListeningForLLMEvents() {
|
|
7139
|
-
var _this$llmChannel2, _this$llmChannel3, _this$llmChannel4, _this$breakouts3
|
|
7202
|
+
var _this$llmChannel2, _this$llmChannel3, _this$llmChannel4, _this$breakouts3;
|
|
7140
7203
|
(_this$llmChannel2 = this.llmChannel) === null || _this$llmChannel2 === void 0 ? void 0 : _this$llmChannel2.off('event:relay.event', this.processRelayEvent);
|
|
7141
7204
|
(_this$llmChannel3 = this.llmChannel) === null || _this$llmChannel3 === void 0 ? void 0 : _this$llmChannel3.off(_constants.LOCUS_LLM_EVENT, this.processLocusLLMEvent);
|
|
7142
7205
|
(_this$llmChannel4 = this.llmChannel) === null || _this$llmChannel4 === void 0 ? void 0 : _this$llmChannel4.off('online', this.handleLLMOnline);
|
|
7143
7206
|
(_this$breakouts3 = this.breakouts) === null || _this$breakouts3 === void 0 ? void 0 : _this$breakouts3.unregisterLLMChannel();
|
|
7144
|
-
|
|
7145
|
-
this.voiceaChannel = undefined;
|
|
7207
|
+
// voiceaChannel persists across LLM reconnects; switchLLMChannel() handles re-subscribing
|
|
7146
7208
|
this.clearLLMHealthCheckTimer();
|
|
7147
7209
|
}
|
|
7148
7210
|
|
|
@@ -7167,10 +7229,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7167
7229
|
value: function stopListeningForMeetingEvents() {
|
|
7168
7230
|
this.stopListeningForLLMEvents();
|
|
7169
7231
|
this.stopListeningForMercuryEvents();
|
|
7170
|
-
if (this.
|
|
7232
|
+
if (this.areVoiceaEventsSetup) {
|
|
7171
7233
|
this.stopTranscription();
|
|
7172
|
-
this.transcription = undefined;
|
|
7173
7234
|
}
|
|
7235
|
+
// Reset to initial shape instead of null - transcription is always a valid object
|
|
7236
|
+
this.transcription = this.getInitialTranscription();
|
|
7174
7237
|
this.annotation.deregisterEvents();
|
|
7175
7238
|
}
|
|
7176
7239
|
}, {
|
|
@@ -7338,7 +7401,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7338
7401
|
return _context22.abrupt("return", undefined);
|
|
7339
7402
|
case 2:
|
|
7340
7403
|
_context22.next = 3;
|
|
7341
|
-
return this.cleanupLLMConneciton(
|
|
7404
|
+
return this.cleanupLLMConneciton({
|
|
7405
|
+
preserveVoiceaChannel: true
|
|
7406
|
+
});
|
|
7342
7407
|
case 3:
|
|
7343
7408
|
if (isJoined) {
|
|
7344
7409
|
_context22.next = 4;
|
|
@@ -7363,7 +7428,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7363
7428
|
this._pendingDatachannelToken = undefined;
|
|
7364
7429
|
}
|
|
7365
7430
|
return _context22.abrupt("return", this.llmChannel.registerAndConnect(url, dataChannelUrl, datachannelToken).then(function (registerAndConnectResult) {
|
|
7366
|
-
var _this36$webinar;
|
|
7431
|
+
var _this36$webinar, _this36$webinar$isPra, _this36$webinar2;
|
|
7367
7432
|
_this36.locusInfo.syncAllHashTreeDatasets({
|
|
7368
7433
|
onlyLLM: true
|
|
7369
7434
|
});
|
|
@@ -7384,12 +7449,27 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7384
7449
|
|
|
7385
7450
|
// Register breakouts channel
|
|
7386
7451
|
_this36.breakouts.registerLLMChannel(_this36.llmChannel);
|
|
7387
|
-
|
|
7388
|
-
// Create VoiceaChannel for this meeting
|
|
7389
|
-
// @ts-ignore - Fix type
|
|
7390
|
-
_this36.voiceaChannel = _this36.webex.internal.voicea.createChannel(_this36.llmChannel);
|
|
7391
7452
|
_loggerProxy.default.logger.info('Meeting:index#updateLLMConnection --> enabled to receive relay events!');
|
|
7392
7453
|
_this36.startLLMHealthCheckTimer();
|
|
7454
|
+
|
|
7455
|
+
// Switch voiceaChannel to use the new LLM channel (preserves transcription state).
|
|
7456
|
+
// Skip if practice session is active - practice session manages its own voicea binding
|
|
7457
|
+
// via updatePSDataChannel, and switching here would break practice session captions.
|
|
7458
|
+
var isPracticeSessionActive = (_this36$webinar$isPra = (_this36$webinar2 = _this36.webinar) === null || _this36$webinar2 === void 0 ? void 0 : _this36$webinar2.isPracticeSessionLLMChannelConnected()) !== null && _this36$webinar$isPra !== void 0 ? _this36$webinar$isPra : false;
|
|
7459
|
+
if (!_this36.voiceaChannel) {
|
|
7460
|
+
// @ts-ignore - Fix type
|
|
7461
|
+
_this36.voiceaChannel = _this36.webex.internal.voicea.createChannel();
|
|
7462
|
+
}
|
|
7463
|
+
if (!isPracticeSessionActive) {
|
|
7464
|
+
// Fire-and-forget: caption restoration shouldn't block LLM connection result.
|
|
7465
|
+
// transcription is always initialized (reset to initial shape, never null),
|
|
7466
|
+
// so no re-init needed here.
|
|
7467
|
+
_this36.voiceaChannel.switchLLMChannel(_this36.llmChannel).then(function () {
|
|
7468
|
+
_this36.startTranscriptionIfNeeded();
|
|
7469
|
+
}).catch(function (error) {
|
|
7470
|
+
_loggerProxy.default.logger.warn('Meeting:index#updateLLMConnection --> failed to switch voicea channel:', error);
|
|
7471
|
+
});
|
|
7472
|
+
}
|
|
7393
7473
|
if (registerAndConnectResult) {
|
|
7394
7474
|
var _this36$breakouts;
|
|
7395
7475
|
if (isInitialJoinPhase) {
|
|
@@ -7847,6 +7927,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7847
7927
|
var causeStatusCode = error === null || error === void 0 ? void 0 : (_cause = error.cause) === null || _cause === void 0 ? void 0 : _cause.statusCode;
|
|
7848
7928
|
return statusCode === 409 || statusCode === 403 || causeStatusCode === 409 || causeStatusCode === 403;
|
|
7849
7929
|
}
|
|
7930
|
+
}, {
|
|
7931
|
+
key: "isLocusUserFullError",
|
|
7932
|
+
value: function isLocusUserFullError(error) {
|
|
7933
|
+
var _error6, _error6$body;
|
|
7934
|
+
return (error === null || error === void 0 ? void 0 : (_error6 = error.error) === null || _error6 === void 0 ? void 0 : (_error6$body = _error6.body) === null || _error6$body === void 0 ? void 0 : _error6$body.errorCode) === _types.LocusErrorCodes.LOCUS_USER_FULL;
|
|
7935
|
+
}
|
|
7850
7936
|
|
|
7851
7937
|
/**
|
|
7852
7938
|
* Determines if the next media attempt should use only TURN-TLS (iceTransportPolicy='relay').
|