@webex/plugin-meetings 3.12.0-next.171 → 3.12.0-next.172
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 +53 -17
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +35 -9
- package/dist/breakouts/index.js.map +1 -1
- package/dist/interceptors/dataChannelAuthToken.js +41 -59
- package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/meeting/index.js +327 -292
- 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/meetings/index.js +4 -1
- package/dist/meetings/index.js.map +1 -1
- package/dist/types/annotation/index.d.ts +19 -0
- package/dist/types/meeting/index.d.ts +46 -12
- package/dist/types/meeting/util.d.ts +3 -1
- package/dist/webinar/index.js +298 -255
- package/dist/webinar/index.js.map +1 -1
- package/package.json +9 -9
- package/src/annotation/index.ts +55 -25
- package/src/breakouts/index.ts +33 -11
- package/src/interceptors/dataChannelAuthToken.ts +48 -77
- package/src/meeting/index.ts +296 -289
- package/src/meeting/util.ts +2 -2
- package/src/meetings/index.ts +2 -1
- package/src/webinar/index.ts +168 -188
- package/test/unit/spec/annotation/index.ts +214 -182
- package/test/unit/spec/breakouts/index.ts +126 -25
- package/test/unit/spec/interceptors/dataChannelAuthToken.ts +81 -99
- package/test/unit/spec/meeting/index.js +939 -705
- package/test/unit/spec/meeting/utils.js +16 -2
- package/test/unit/spec/meetings/index.js +5 -0
- package/test/unit/spec/webinar/index.ts +886 -718
package/dist/meeting/index.js
CHANGED
|
@@ -579,16 +579,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
579
579
|
(0, _defineProperty3.default)(_this, "promisesWaitingForPropUpdate", {});
|
|
580
580
|
(0, _defineProperty3.default)(_this, "voiceaListenerCallbacks", (0, _defineProperty3.default)((0, _defineProperty3.default)((0, _defineProperty3.default)((0, _defineProperty3.default)({}, _internalPluginVoicea.EVENT_TRIGGERS.VOICEA_ANNOUNCEMENT, function (payload) {
|
|
581
581
|
_this.transcription.languageOptions = payload;
|
|
582
|
+
var eventPayload = _objectSpread({}, payload);
|
|
582
583
|
_loggerProxy.default.logger.debug("".concat(_util.default.getScopeLog({
|
|
583
584
|
file: 'meeting/index',
|
|
584
585
|
function: 'setUpVoiceaListeners'
|
|
585
586
|
}), "event#").concat(_constants.EVENT_TRIGGERS.MEETING_STARTED_RECEIVING_TRANSCRIPTION));
|
|
586
587
|
if (_this.getCurUserType() !== 'host') {
|
|
587
|
-
delete
|
|
588
|
+
delete eventPayload.spokenLanguages;
|
|
588
589
|
}
|
|
589
590
|
|
|
590
591
|
// @ts-ignore
|
|
591
|
-
_this.trigger(_constants.EVENT_TRIGGERS.MEETING_STARTED_RECEIVING_TRANSCRIPTION,
|
|
592
|
+
_this.trigger(_constants.EVENT_TRIGGERS.MEETING_STARTED_RECEIVING_TRANSCRIPTION, eventPayload);
|
|
592
593
|
}), _internalPluginVoicea.EVENT_TRIGGERS.CAPTIONS_TURNED_ON, function () {
|
|
593
594
|
_this.transcription.status = _internalPluginVoicea.TURN_ON_CAPTION_STATUS.ENABLED;
|
|
594
595
|
}), _internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND, function (payload) {
|
|
@@ -627,6 +628,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
627
628
|
(0, _defineProperty3.default)(_this, "logUploadIntervalIndex", void 0);
|
|
628
629
|
(0, _defineProperty3.default)(_this, "mediaServerIp", void 0);
|
|
629
630
|
(0, _defineProperty3.default)(_this, "llmHealthCheckTimer", void 0);
|
|
631
|
+
/**
|
|
632
|
+
* The LLM channel owned by this meeting for datachannel communication.
|
|
633
|
+
* Created in updateLLMConnection, cleaned up in cleanupLLMConneciton.
|
|
634
|
+
*/
|
|
635
|
+
(0, _defineProperty3.default)(_this, "llmChannel", void 0);
|
|
636
|
+
/**
|
|
637
|
+
* The Voicea channel for transcription/captions, bound to this meeting's LLM channel.
|
|
638
|
+
*/
|
|
639
|
+
(0, _defineProperty3.default)(_this, "voiceaChannel", void 0);
|
|
640
|
+
/**
|
|
641
|
+
* Pending datachannel token saved from join response, used when creating the LLM channel.
|
|
642
|
+
*/
|
|
643
|
+
(0, _defineProperty3.default)(_this, "_pendingDatachannelToken", void 0);
|
|
630
644
|
/** Handles Locus LLM events
|
|
631
645
|
*
|
|
632
646
|
* @param {LocusLLMEvent} event - The Locus LLM event to process
|
|
@@ -665,9 +679,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
665
679
|
}
|
|
666
680
|
switch (e.data.relayType) {
|
|
667
681
|
case _constants3.REACTION_RELAY_TYPES.REACTION:
|
|
682
|
+
// @ts-ignore - config coming from registerPlugin
|
|
668
683
|
if (
|
|
669
684
|
// @ts-ignore - config coming from registerPlugin
|
|
670
|
-
|
|
685
|
+
_this.config.receiveReactions && _this.isReactionsSupported()) {
|
|
671
686
|
var _this$locusInfo, _this$locusInfo$info;
|
|
672
687
|
var member = _this.members.membersCollection.get(e.data.sender.participantId);
|
|
673
688
|
if (!member && !((_this$locusInfo = _this.locusInfo) !== null && _this$locusInfo !== void 0 && (_this$locusInfo$info = _this$locusInfo.info) !== null && _this$locusInfo$info !== void 0 && _this$locusInfo$info.isWebinar)) {
|
|
@@ -711,92 +726,70 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
711
726
|
}, _constants.EVENT_TRIGGERS.MEETING_TRANSCRIPTION_CONNECTED, undefined);
|
|
712
727
|
});
|
|
713
728
|
/**
|
|
714
|
-
* Disconnects and cleans up the
|
|
715
|
-
*
|
|
716
|
-
* Ownership-aware: only calls `disconnectLLM` when this meeting is the
|
|
717
|
-
* current owner of the default LLM session (or when no owner is recorded).
|
|
718
|
-
* Event listeners belonging to this meeting instance are always detached
|
|
719
|
-
* so they do not receive another meeting's relay events.
|
|
729
|
+
* Disconnects and cleans up the LLM channel owned by this meeting.
|
|
720
730
|
*
|
|
721
731
|
* @param {Object} options
|
|
722
|
-
* @param {boolean} [options.removeOnlineListener=true] removes the one-time online listener
|
|
723
732
|
* @param {boolean} [options.throwOnError=true] rethrows disconnect errors when true
|
|
733
|
+
* @param {boolean} [options.preserveVoiceaChannel=false] when true, keeps voiceaChannel for switchLLMChannel() during reconnects
|
|
724
734
|
* @returns {Promise<void>}
|
|
725
735
|
*/
|
|
726
736
|
(0, _defineProperty3.default)(_this, "cleanupLLMConneciton", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
727
737
|
var _ref3,
|
|
728
|
-
_ref3$removeOnlineLis,
|
|
729
|
-
removeOnlineListener,
|
|
730
738
|
_ref3$throwOnError,
|
|
731
739
|
throwOnError,
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
_this$webex$internal$2,
|
|
736
|
-
currentOwnerAfterCleanup,
|
|
737
|
-
_this$webex$internal$3,
|
|
738
|
-
_this$webex$internal$4,
|
|
740
|
+
_ref3$preserveVoiceaC,
|
|
741
|
+
preserveVoiceaChannel,
|
|
742
|
+
_this$voiceaChannel,
|
|
739
743
|
_args = arguments,
|
|
740
744
|
_t;
|
|
741
745
|
return _regenerator.default.wrap(function (_context) {
|
|
742
746
|
while (1) switch (_context.prev = _context.next) {
|
|
743
747
|
case 0:
|
|
744
|
-
_ref3 = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref3$
|
|
745
|
-
//
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
748
|
+
_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;
|
|
749
|
+
// Always clear the timer, even if there's no channel
|
|
750
|
+
_this.clearLLMHealthCheckTimer();
|
|
751
|
+
|
|
752
|
+
// Permanent cleanup must deregister voiceaChannel regardless of LLM presence.
|
|
753
|
+
// When a transient reconnect fails (LLM registration error), llmChannel is undefined
|
|
754
|
+
// but voiceaChannel may still exist with listeners attached to the old emitter.
|
|
755
|
+
if (!preserveVoiceaChannel) {
|
|
756
|
+
(_this$voiceaChannel = _this.voiceaChannel) === null || _this$voiceaChannel === void 0 ? void 0 : _this$voiceaChannel.deregisterEvents();
|
|
757
|
+
_this.voiceaChannel = undefined;
|
|
758
|
+
}
|
|
759
|
+
if (_this.llmChannel) {
|
|
760
|
+
_context.next = 1;
|
|
751
761
|
break;
|
|
752
762
|
}
|
|
763
|
+
return _context.abrupt("return");
|
|
764
|
+
case 1:
|
|
765
|
+
_context.prev = 1;
|
|
753
766
|
_context.next = 2;
|
|
754
|
-
return _this.
|
|
767
|
+
return _this.llmChannel.disconnect({
|
|
755
768
|
code: 3050,
|
|
756
769
|
reason: 'done (permanent)'
|
|
757
|
-
}
|
|
770
|
+
});
|
|
758
771
|
case 2:
|
|
759
772
|
_context.next = 4;
|
|
760
773
|
break;
|
|
761
774
|
case 3:
|
|
762
|
-
|
|
763
|
-
case 4:
|
|
764
|
-
_context.next = 6;
|
|
765
|
-
break;
|
|
766
|
-
case 5:
|
|
767
|
-
_context.prev = 5;
|
|
775
|
+
_context.prev = 3;
|
|
768
776
|
_t = _context["catch"](1);
|
|
769
|
-
_loggerProxy.default.logger.error('Meeting:index#cleanupLLMConneciton --> Failed to disconnect
|
|
777
|
+
_loggerProxy.default.logger.error('Meeting:index#cleanupLLMConneciton --> Failed to disconnect LLM channel', _t);
|
|
770
778
|
if (!throwOnError) {
|
|
771
|
-
_context.next =
|
|
779
|
+
_context.next = 4;
|
|
772
780
|
break;
|
|
773
781
|
}
|
|
774
782
|
throw _t;
|
|
775
|
-
case
|
|
776
|
-
_context.prev =
|
|
777
|
-
if (removeOnlineListener) {
|
|
778
|
-
// @ts-ignore - Fix type
|
|
779
|
-
_this.webex.internal.llm.off('online', _this.handleLLMOnline);
|
|
780
|
-
}
|
|
783
|
+
case 4:
|
|
784
|
+
_context.prev = 4;
|
|
781
785
|
_this.stopListeningForLLMEvents();
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
if (isOwner) {
|
|
786
|
-
_this$webex$internal$2 =
|
|
787
|
-
// @ts-ignore - Fix type
|
|
788
|
-
_this.webex.internal.llm.resolveSessionOwnership(_this.id, _constants.LLM_DEFAULT_SESSION), currentOwnerAfterCleanup = _this$webex$internal$2.currentOwner;
|
|
789
|
-
if (currentOwnerAfterCleanup === _this.id) {
|
|
790
|
-
// @ts-ignore - Fix type
|
|
791
|
-
(_this$webex$internal$3 = (_this$webex$internal$4 = _this.webex.internal.llm).setOwnerMeetingId) === null || _this$webex$internal$3 === void 0 ? void 0 : _this$webex$internal$3.call(_this$webex$internal$4, undefined);
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
return _context.finish(6);
|
|
795
|
-
case 7:
|
|
786
|
+
_this.llmChannel = undefined;
|
|
787
|
+
return _context.finish(4);
|
|
788
|
+
case 5:
|
|
796
789
|
case "end":
|
|
797
790
|
return _context.stop();
|
|
798
791
|
}
|
|
799
|
-
}, _callee, null, [[1,
|
|
792
|
+
}, _callee, null, [[1, 3, 4, 5]]);
|
|
800
793
|
})));
|
|
801
794
|
/**
|
|
802
795
|
* Handles ROAP_FAILURE event from the webrtc media connection
|
|
@@ -1486,7 +1479,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1486
1479
|
pendingPromiseResolve = _this$queuedMediaUpda.pendingPromiseResolve,
|
|
1487
1480
|
pendingPromiseReject = _this$queuedMediaUpda.pendingPromiseReject,
|
|
1488
1481
|
mediaUpdateType = _this$queuedMediaUpda.mediaUpdateType,
|
|
1489
|
-
|
|
1482
|
+
options = _this$queuedMediaUpda.options;
|
|
1490
1483
|
_loggerProxy.default.logger.log("Meeting:index#processNextQueuedMediaUpdate --> performing delayed media update type=".concat(mediaUpdateType));
|
|
1491
1484
|
var mediaUpdate = _promise.default.resolve();
|
|
1492
1485
|
switch (mediaUpdateType) {
|
|
@@ -1497,7 +1490,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1497
1490
|
mediaUpdate = _this.requestScreenShareFloor();
|
|
1498
1491
|
break;
|
|
1499
1492
|
case MEDIA_UPDATE_TYPE.UPDATE_MEDIA:
|
|
1500
|
-
mediaUpdate = _this.updateMedia(
|
|
1493
|
+
mediaUpdate = _this.updateMedia(options);
|
|
1501
1494
|
break;
|
|
1502
1495
|
default:
|
|
1503
1496
|
_loggerProxy.default.logger.error("Peer-connection-manager:index#processNextQueuedMediaUpdate --> unsupported media update type ".concat(mediaUpdateType, " found in the queue"));
|
|
@@ -1652,15 +1645,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1652
1645
|
|
|
1653
1646
|
// Listener teardown (transcription, annotation, llm/mercury) runs in
|
|
1654
1647
|
// stopListeningForMeetingEvents() before /leave and /end so events
|
|
1655
|
-
// received mid-teardown do not trigger Locus syncs.
|
|
1656
|
-
//
|
|
1657
|
-
//
|
|
1658
|
-
//
|
|
1659
|
-
// Ownership-aware token clear is encapsulated inside clearDataChannelToken().
|
|
1660
|
-
_this.clearDataChannelToken();
|
|
1648
|
+
// received mid-teardown do not trigger Locus syncs.
|
|
1649
|
+
// Token cleanup happens automatically when cleanupLLMConneciton destroys the channel.
|
|
1650
|
+
// A new voiceaChannel is created on the next join. In-session LLM reconnects and
|
|
1651
|
+
// practice-session transitions use their own cleanup paths and preserve the channel.
|
|
1661
1652
|
_context5.next = 1;
|
|
1662
1653
|
return _this.cleanupLLMConneciton({
|
|
1663
|
-
throwOnError: false
|
|
1654
|
+
throwOnError: false,
|
|
1655
|
+
preserveVoiceaChannel: false
|
|
1664
1656
|
});
|
|
1665
1657
|
case 1:
|
|
1666
1658
|
case "end":
|
|
@@ -1860,6 +1852,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1860
1852
|
}, {
|
|
1861
1853
|
parent: _this.webex
|
|
1862
1854
|
});
|
|
1855
|
+
/**
|
|
1856
|
+
* VoiceaChannel for transcription/captions. Created without llmChannel;
|
|
1857
|
+
* switchLLMChannel() is called in updateLLMConnection() when LLM connects.
|
|
1858
|
+
* @instance
|
|
1859
|
+
* @type {VoiceaChannel}
|
|
1860
|
+
* @public
|
|
1861
|
+
* @memberof Meeting
|
|
1862
|
+
*/
|
|
1863
|
+
// @ts-ignore - Fix type
|
|
1864
|
+
_this.voiceaChannel = _this.webex.internal.voicea.createChannel();
|
|
1863
1865
|
/**
|
|
1864
1866
|
* helper class for managing receive slots (for multistream media connections)
|
|
1865
1867
|
*/
|
|
@@ -2252,10 +2254,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2252
2254
|
// submitting the client.locus.sync.complete CA event is owned by the metrics
|
|
2253
2255
|
// facade. Wire each method to the layer that owns that responsibility.
|
|
2254
2256
|
saveLatency: function saveLatency() {
|
|
2255
|
-
var _this$webex$internal
|
|
2257
|
+
var _this$webex$internal$;
|
|
2256
2258
|
return (
|
|
2257
2259
|
// @ts-ignore
|
|
2258
|
-
(_this$webex$internal$
|
|
2260
|
+
(_this$webex$internal$ = _this.webex.internal.newMetrics.callDiagnosticLatencies).saveLatency.apply(_this$webex$internal$, arguments)
|
|
2259
2261
|
);
|
|
2260
2262
|
},
|
|
2261
2263
|
saveTimestamp: function saveTimestamp(saveTimestampOptions) {
|
|
@@ -2271,10 +2273,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2271
2273
|
}
|
|
2272
2274
|
},
|
|
2273
2275
|
clearLocusSyncLatency: function clearLocusSyncLatency() {
|
|
2274
|
-
var _this$webex$internal$
|
|
2276
|
+
var _this$webex$internal$2;
|
|
2275
2277
|
return (
|
|
2276
2278
|
// @ts-ignore
|
|
2277
|
-
(_this$webex$internal$
|
|
2279
|
+
(_this$webex$internal$2 = _this.webex.internal.newMetrics.callDiagnosticLatencies).clearLocusSyncLatency.apply(_this$webex$internal$2, arguments)
|
|
2278
2280
|
);
|
|
2279
2281
|
}
|
|
2280
2282
|
}
|
|
@@ -2340,19 +2342,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2340
2342
|
* @private
|
|
2341
2343
|
* @memberof Meeting
|
|
2342
2344
|
*/
|
|
2343
|
-
_this.transcription =
|
|
2344
|
-
captions: [],
|
|
2345
|
-
isListening: false,
|
|
2346
|
-
commandText: '',
|
|
2347
|
-
languageOptions: {
|
|
2348
|
-
currentSpokenLanguage: 'en'
|
|
2349
|
-
},
|
|
2350
|
-
showCaptionBox: false,
|
|
2351
|
-
transcribingRequestStatus: 'INACTIVE',
|
|
2352
|
-
isCaptioning: false,
|
|
2353
|
-
interimCaptions: {},
|
|
2354
|
-
speakerProxy: {}
|
|
2355
|
-
};
|
|
2345
|
+
_this.transcription = _this.getInitialTranscription();
|
|
2356
2346
|
|
|
2357
2347
|
/**
|
|
2358
2348
|
* Password status. If it's PASSWORD_STATUS.REQUIRED then verifyPassword() needs to be called
|
|
@@ -2648,6 +2638,30 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2648
2638
|
*/
|
|
2649
2639
|
(0, _inherits2.default)(Meeting, _StatelessWebexPlugin);
|
|
2650
2640
|
return (0, _createClass2.default)(Meeting, [{
|
|
2641
|
+
key: "getInitialTranscription",
|
|
2642
|
+
value:
|
|
2643
|
+
/**
|
|
2644
|
+
* Returns the initial transcription object shape.
|
|
2645
|
+
* Used by constructor and reset paths to ensure consistent initialization.
|
|
2646
|
+
* @private
|
|
2647
|
+
* @returns {Transcription}
|
|
2648
|
+
*/
|
|
2649
|
+
function getInitialTranscription() {
|
|
2650
|
+
return {
|
|
2651
|
+
captions: [],
|
|
2652
|
+
isListening: false,
|
|
2653
|
+
commandText: '',
|
|
2654
|
+
languageOptions: {
|
|
2655
|
+
currentSpokenLanguage: 'en'
|
|
2656
|
+
},
|
|
2657
|
+
showCaptionBox: false,
|
|
2658
|
+
transcribingRequestStatus: 'INACTIVE',
|
|
2659
|
+
isCaptioning: false,
|
|
2660
|
+
interimCaptions: {},
|
|
2661
|
+
speakerProxy: {}
|
|
2662
|
+
};
|
|
2663
|
+
}
|
|
2664
|
+
}, {
|
|
2651
2665
|
key: "getIngressPayloadTypeCallback",
|
|
2652
2666
|
value: function getIngressPayloadTypeCallback(mediaType, codecMimeType) {
|
|
2653
2667
|
if (this.isMultistream) {
|
|
@@ -3363,9 +3377,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3363
3377
|
}, {
|
|
3364
3378
|
key: "emitLocusSyncCompleteMetric",
|
|
3365
3379
|
value: function emitLocusSyncCompleteMetric(meetingId, completed) {
|
|
3366
|
-
var _this$webex$internal$
|
|
3380
|
+
var _this$webex$internal$3, _this$webex$internal$4;
|
|
3367
3381
|
// @ts-ignore
|
|
3368
|
-
var llmWebsocketUrl = ((_this$webex$internal$
|
|
3382
|
+
var llmWebsocketUrl = ((_this$webex$internal$3 = this.webex.internal.llm) === null || _this$webex$internal$3 === void 0 ? void 0 : (_this$webex$internal$4 = _this$webex$internal$3.getWebSocketUrl) === null || _this$webex$internal$4 === void 0 ? void 0 : _this$webex$internal$4.call(_this$webex$internal$3)) || undefined;
|
|
3369
3383
|
|
|
3370
3384
|
// Per the LLM sync-latency spec, the event carries the LLM websocket url identifier,
|
|
3371
3385
|
// the llmInfo.dataSet (main, atd-active or atd-unmuted) and the syncLatency block.
|
|
@@ -3510,20 +3524,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3510
3524
|
}, {
|
|
3511
3525
|
key: "setUpVoiceaListeners",
|
|
3512
3526
|
value: function setUpVoiceaListeners() {
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
this.
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
this.
|
|
3521
|
-
|
|
3522
|
-
// @ts-ignore
|
|
3523
|
-
this.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND]);
|
|
3524
|
-
|
|
3525
|
-
// @ts-ignore
|
|
3526
|
-
this.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION]);
|
|
3527
|
+
if (!this.voiceaChannel) {
|
|
3528
|
+
_loggerProxy.default.logger.warn('Meeting:index#setUpVoiceaListeners --> voiceaChannel not available');
|
|
3529
|
+
return;
|
|
3530
|
+
}
|
|
3531
|
+
this.voiceaChannel.on(_internalPluginVoicea.EVENT_TRIGGERS.VOICEA_ANNOUNCEMENT, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.VOICEA_ANNOUNCEMENT]);
|
|
3532
|
+
this.voiceaChannel.on(_internalPluginVoicea.EVENT_TRIGGERS.CAPTIONS_TURNED_ON, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.CAPTIONS_TURNED_ON]);
|
|
3533
|
+
this.voiceaChannel.on(_internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND]);
|
|
3534
|
+
this.voiceaChannel.on(_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION]);
|
|
3527
3535
|
this.areVoiceaEventsSetup = true;
|
|
3528
3536
|
}
|
|
3529
3537
|
|
|
@@ -3830,28 +3838,32 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3830
3838
|
// user need to be joined to start the llm and receive transcription
|
|
3831
3839
|
if (_this12.isJoined()) {
|
|
3832
3840
|
// @ts-ignore - config coming from registerPlugin
|
|
3833
|
-
if (transcribing && !_this12.
|
|
3834
|
-
_this12
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3841
|
+
if (transcribing && !_this12.areVoiceaEventsSetup) {
|
|
3842
|
+
var _this12$voiceaChannel;
|
|
3843
|
+
if ((_this12$voiceaChannel = _this12.voiceaChannel) !== null && _this12$voiceaChannel !== void 0 && _this12$voiceaChannel.isLLMConnected()) {
|
|
3844
|
+
_this12.startTranscription();
|
|
3845
|
+
}
|
|
3846
|
+
} else if (!transcribing) {
|
|
3847
|
+
if (_this12.areVoiceaEventsSetup) {
|
|
3848
|
+
_triggerProxy.default.trigger(_this12, {
|
|
3849
|
+
file: 'meeting/index',
|
|
3850
|
+
function: 'setupLocusControlsListener'
|
|
3851
|
+
}, _constants.EVENT_TRIGGERS.MEETING_STOPPED_RECEIVING_TRANSCRIPTION, {
|
|
3852
|
+
caption: caption,
|
|
3853
|
+
transcribing: transcribing
|
|
3854
|
+
});
|
|
3855
|
+
}
|
|
3843
3856
|
}
|
|
3844
3857
|
}
|
|
3845
3858
|
});
|
|
3846
3859
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_TRANSCRIPTION_SPOKEN_LANGUAGE_UPDATED, function (_ref13) {
|
|
3847
3860
|
var spokenLanguage = _ref13.spokenLanguage;
|
|
3848
3861
|
if (spokenLanguage) {
|
|
3849
|
-
var _this12$transcription;
|
|
3862
|
+
var _this12$transcription, _this12$voiceaChannel2;
|
|
3850
3863
|
if ((_this12$transcription = _this12.transcription) !== null && _this12$transcription !== void 0 && _this12$transcription.languageOptions) {
|
|
3851
3864
|
_this12.transcription.languageOptions.currentSpokenLanguage = spokenLanguage;
|
|
3852
3865
|
}
|
|
3853
|
-
|
|
3854
|
-
_this12.webex.internal.voicea.onSpokenLanguageUpdate(spokenLanguage, _this12.id);
|
|
3866
|
+
(_this12$voiceaChannel2 = _this12.voiceaChannel) === null || _this12$voiceaChannel2 === void 0 ? void 0 : _this12$voiceaChannel2.onSpokenLanguageUpdate(spokenLanguage, _this12.id);
|
|
3855
3867
|
_triggerProxy.default.trigger(_this12, {
|
|
3856
3868
|
file: 'meeting/index',
|
|
3857
3869
|
function: 'setupLocusControlsListener'
|
|
@@ -3873,8 +3885,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3873
3885
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_HESIOD_LLM_ID_UPDATED, function (_ref15) {
|
|
3874
3886
|
var hesiodLlmId = _ref15.hesiodLlmId;
|
|
3875
3887
|
if (hesiodLlmId) {
|
|
3876
|
-
|
|
3877
|
-
_this12.
|
|
3888
|
+
var _this12$voiceaChannel3;
|
|
3889
|
+
(_this12$voiceaChannel3 = _this12.voiceaChannel) === null || _this12$voiceaChannel3 === void 0 ? void 0 : _this12$voiceaChannel3.onCaptionServiceIdUpdate(hesiodLlmId);
|
|
3878
3890
|
}
|
|
3879
3891
|
});
|
|
3880
3892
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_BREAKOUT_UPDATED, function (_ref16) {
|
|
@@ -6682,9 +6694,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6682
6694
|
reject(new Error('Webex Assistant is not enabled/supported'));
|
|
6683
6695
|
}
|
|
6684
6696
|
try {
|
|
6697
|
+
var _this32$voiceaChannel2, _this32$voiceaChannel3;
|
|
6685
6698
|
var _voiceaListenerCaptionUpdate = function voiceaListenerCaptionUpdate(payload) {
|
|
6686
|
-
|
|
6687
|
-
_this32.
|
|
6699
|
+
var _this32$voiceaChannel;
|
|
6700
|
+
(_this32$voiceaChannel = _this32.voiceaChannel) === null || _this32$voiceaChannel === void 0 ? void 0 : _this32$voiceaChannel.off(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, _voiceaListenerCaptionUpdate);
|
|
6688
6701
|
var statusCode = payload.statusCode;
|
|
6689
6702
|
if (statusCode === 200) {
|
|
6690
6703
|
_this32.transcription.languageOptions = _objectSpread(_objectSpread({}, _this32.transcription.languageOptions), {}, {
|
|
@@ -6695,10 +6708,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6695
6708
|
reject(payload);
|
|
6696
6709
|
}
|
|
6697
6710
|
};
|
|
6698
|
-
|
|
6699
|
-
_this32.
|
|
6700
|
-
// @ts-ignore
|
|
6701
|
-
_this32.webex.internal.voicea.requestLanguage(language);
|
|
6711
|
+
(_this32$voiceaChannel2 = _this32.voiceaChannel) === null || _this32$voiceaChannel2 === void 0 ? void 0 : _this32$voiceaChannel2.on(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, _voiceaListenerCaptionUpdate);
|
|
6712
|
+
(_this32$voiceaChannel3 = _this32.voiceaChannel) === null || _this32$voiceaChannel3 === void 0 ? void 0 : _this32$voiceaChannel3.requestLanguage(language);
|
|
6702
6713
|
} catch (error) {
|
|
6703
6714
|
_loggerProxy.default.logger.error("Meeting:index#setCaptionLanguage --> ".concat(error));
|
|
6704
6715
|
reject(error);
|
|
@@ -6725,9 +6736,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6725
6736
|
reject(new Error('Only host can set spoken language'));
|
|
6726
6737
|
}
|
|
6727
6738
|
try {
|
|
6739
|
+
var _this33$voiceaChannel2, _this33$voiceaChannel3;
|
|
6728
6740
|
var _voiceaListenerLanguageUpdate = function voiceaListenerLanguageUpdate(payload) {
|
|
6729
|
-
|
|
6730
|
-
_this33.
|
|
6741
|
+
var _this33$voiceaChannel;
|
|
6742
|
+
(_this33$voiceaChannel = _this33.voiceaChannel) === null || _this33$voiceaChannel === void 0 ? void 0 : _this33$voiceaChannel.off(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, _voiceaListenerLanguageUpdate);
|
|
6731
6743
|
var languageCode = payload.languageCode;
|
|
6732
6744
|
if (languageCode) {
|
|
6733
6745
|
_this33.transcription.languageOptions = _objectSpread(_objectSpread({}, _this33.transcription.languageOptions), {}, {
|
|
@@ -6738,12 +6750,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6738
6750
|
reject(payload);
|
|
6739
6751
|
}
|
|
6740
6752
|
};
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
_this33.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, _voiceaListenerLanguageUpdate);
|
|
6744
|
-
|
|
6745
|
-
// @ts-ignore
|
|
6746
|
-
_this33.webex.internal.voicea.setSpokenLanguage(language);
|
|
6753
|
+
(_this33$voiceaChannel2 = _this33.voiceaChannel) === null || _this33$voiceaChannel2 === void 0 ? void 0 : _this33$voiceaChannel2.on(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, _voiceaListenerLanguageUpdate);
|
|
6754
|
+
(_this33$voiceaChannel3 = _this33.voiceaChannel) === null || _this33$voiceaChannel3 === void 0 ? void 0 : _this33$voiceaChannel3.setSpokenLanguage(language);
|
|
6747
6755
|
} catch (error) {
|
|
6748
6756
|
_loggerProxy.default.logger.error("Meeting:index#setSpokenLanguage --> ".concat(error));
|
|
6749
6757
|
reject(error);
|
|
@@ -6766,23 +6774,28 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6766
6774
|
while (1) switch (_context19.prev = _context19.next) {
|
|
6767
6775
|
case 0:
|
|
6768
6776
|
if (!this.isJoined()) {
|
|
6769
|
-
_context19.next =
|
|
6777
|
+
_context19.next = 6;
|
|
6770
6778
|
break;
|
|
6771
6779
|
}
|
|
6772
6780
|
_loggerProxy.default.logger.info('Meeting:index#startTranscription --> Attempting to enable transcription!');
|
|
6773
6781
|
_context19.prev = 1;
|
|
6782
|
+
if (this.voiceaChannel) {
|
|
6783
|
+
_context19.next = 2;
|
|
6784
|
+
break;
|
|
6785
|
+
}
|
|
6786
|
+
_loggerProxy.default.logger.warn('Meeting:index#startTranscription --> voiceaChannel not available');
|
|
6787
|
+
return _context19.abrupt("return");
|
|
6788
|
+
case 2:
|
|
6774
6789
|
if (!this.areVoiceaEventsSetup) {
|
|
6775
6790
|
this.setUpVoiceaListeners();
|
|
6776
6791
|
}
|
|
6777
|
-
|
|
6778
|
-
|
|
6779
|
-
_context19.next = 2;
|
|
6780
|
-
return this.webex.internal.voicea.turnOnCaptions(options === null || options === void 0 ? void 0 : options.spokenLanguage);
|
|
6781
|
-
case 2:
|
|
6782
|
-
_context19.next = 4;
|
|
6783
|
-
break;
|
|
6792
|
+
_context19.next = 3;
|
|
6793
|
+
return this.voiceaChannel.turnOnCaptions(options === null || options === void 0 ? void 0 : options.spokenLanguage);
|
|
6784
6794
|
case 3:
|
|
6785
|
-
_context19.
|
|
6795
|
+
_context19.next = 5;
|
|
6796
|
+
break;
|
|
6797
|
+
case 4:
|
|
6798
|
+
_context19.prev = 4;
|
|
6786
6799
|
_t12 = _context19["catch"](1);
|
|
6787
6800
|
_loggerProxy.default.logger.error("Meeting:index#startTranscription --> ".concat(_t12));
|
|
6788
6801
|
_metrics.default.sendBehavioralMetric(_constants2.default.RECEIVE_TRANSCRIPTION_FAILURE, {
|
|
@@ -6790,40 +6803,59 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6790
6803
|
reason: _t12.message,
|
|
6791
6804
|
stack: _t12.stack
|
|
6792
6805
|
});
|
|
6793
|
-
case 4:
|
|
6794
|
-
_context19.next = 6;
|
|
6795
|
-
break;
|
|
6796
6806
|
case 5:
|
|
6807
|
+
_context19.next = 7;
|
|
6808
|
+
break;
|
|
6809
|
+
case 6:
|
|
6797
6810
|
_loggerProxy.default.logger.error("Meeting:index#startTranscription --> meeting joined : ".concat(this.isJoined()));
|
|
6798
6811
|
throw new Error('Meeting is not joined');
|
|
6799
|
-
case
|
|
6812
|
+
case 7:
|
|
6800
6813
|
case "end":
|
|
6801
6814
|
return _context19.stop();
|
|
6802
6815
|
}
|
|
6803
|
-
}, _callee19, this, [[1,
|
|
6816
|
+
}, _callee19, this, [[1, 4]]);
|
|
6804
6817
|
}));
|
|
6805
6818
|
function startTranscription(_x15) {
|
|
6806
6819
|
return _startTranscription.apply(this, arguments);
|
|
6807
6820
|
}
|
|
6808
6821
|
return startTranscription;
|
|
6809
|
-
}()
|
|
6822
|
+
}()
|
|
6823
|
+
/**
|
|
6824
|
+
* Starts transcription when requested by the current Locus controls and an
|
|
6825
|
+
* active LLM channel is ready.
|
|
6826
|
+
* @internal
|
|
6827
|
+
* @returns {void}
|
|
6828
|
+
*/
|
|
6829
|
+
)
|
|
6830
|
+
}, {
|
|
6831
|
+
key: "startTranscriptionIfNeeded",
|
|
6832
|
+
value: function startTranscriptionIfNeeded() {
|
|
6833
|
+
var _this$locusInfo$contr2, _this$locusInfo$contr3, _this$voiceaChannel2;
|
|
6834
|
+
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()) {
|
|
6835
|
+
this.startTranscription();
|
|
6836
|
+
}
|
|
6837
|
+
}
|
|
6810
6838
|
}, {
|
|
6811
6839
|
key: "isRelayEventRouteValid",
|
|
6812
6840
|
value:
|
|
6813
6841
|
/**
|
|
6814
6842
|
* Verifies the relay event was delivered for the active LLM session binding.
|
|
6843
|
+
* With the factory pattern, each meeting owns its channel, so we just verify
|
|
6844
|
+
* the route matches our channel's binding or the practice session binding.
|
|
6815
6845
|
* @param {RelayEvent} event Event object coming from LLM Connection
|
|
6816
6846
|
* @returns {boolean}
|
|
6817
6847
|
*/
|
|
6818
6848
|
function isRelayEventRouteValid(event) {
|
|
6819
|
-
var _event$headers;
|
|
6849
|
+
var _event$headers, _this$webinar$isPract, _this$webinar, _this$webinar2, _this$llmChannel;
|
|
6820
6850
|
var route = event === null || event === void 0 ? void 0 : (_event$headers = event.headers) === null || _event$headers === void 0 ? void 0 : _event$headers.route;
|
|
6821
6851
|
if (!route) {
|
|
6822
6852
|
return true;
|
|
6823
6853
|
}
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6854
|
+
|
|
6855
|
+
// With the factory pattern, both channels may be connected simultaneously.
|
|
6856
|
+
// Determine which session is "active" based on whether PS channel is connected.
|
|
6857
|
+
var isPracticeSession = (_this$webinar$isPract = (_this$webinar = this.webinar) === null || _this$webinar === void 0 ? void 0 : _this$webinar.isPracticeSessionLLMChannelConnected()) !== null && _this$webinar$isPract !== void 0 ? _this$webinar$isPract : false;
|
|
6858
|
+
var expectedBinding = isPracticeSession ? (_this$webinar2 = this.webinar) === null || _this$webinar2 === void 0 ? void 0 : _this$webinar2.getPracticeSessionBinding() : (_this$llmChannel = this.llmChannel) === null || _this$llmChannel === void 0 ? void 0 : _this$llmChannel.getBinding();
|
|
6827
6859
|
if (!expectedBinding || route === expectedBinding) {
|
|
6828
6860
|
return true;
|
|
6829
6861
|
}
|
|
@@ -6837,20 +6869,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6837
6869
|
* @returns {void}
|
|
6838
6870
|
*/
|
|
6839
6871
|
function stopTranscription() {
|
|
6840
|
-
|
|
6841
|
-
this.
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
this.
|
|
6845
|
-
|
|
6846
|
-
// @ts-ignore
|
|
6847
|
-
this.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND]);
|
|
6848
|
-
|
|
6849
|
-
// @ts-ignore
|
|
6850
|
-
this.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION]);
|
|
6851
|
-
|
|
6852
|
-
// @ts-ignore
|
|
6853
|
-
this.webex.internal.voicea.deregisterEvents();
|
|
6872
|
+
var _this$voiceaChannel3, _this$voiceaChannel4, _this$voiceaChannel5, _this$voiceaChannel6, _this$voiceaChannel7;
|
|
6873
|
+
(_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]);
|
|
6874
|
+
(_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]);
|
|
6875
|
+
(_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]);
|
|
6876
|
+
(_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]);
|
|
6877
|
+
(_this$voiceaChannel7 = this.voiceaChannel) === null || _this$voiceaChannel7 === void 0 ? void 0 : _this$voiceaChannel7.deregisterEvents();
|
|
6854
6878
|
this.areVoiceaEventsSetup = false;
|
|
6855
6879
|
this.triggerStopReceivingTranscriptionEvent();
|
|
6856
6880
|
}
|
|
@@ -6879,15 +6903,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6879
6903
|
key: "restoreLLMSubscriptionsIfNeeded",
|
|
6880
6904
|
value: function restoreLLMSubscriptionsIfNeeded() {
|
|
6881
6905
|
try {
|
|
6882
|
-
var _this$
|
|
6883
|
-
var keepTranscriptionSubscribed =
|
|
6884
|
-
(_this$webex$internal$9 = this.webex.internal.voicea) === null || _this$webex$internal$9 === void 0 ? void 0 : (_this$webex$internal$0 = _this$webex$internal$9.getKeepTranscriptionSubscribed) === null || _this$webex$internal$0 === void 0 ? void 0 : _this$webex$internal$0.call(_this$webex$internal$9);
|
|
6906
|
+
var _this$voiceaChannel8, _this$voiceaChannel9;
|
|
6907
|
+
var keepTranscriptionSubscribed = (_this$voiceaChannel8 = this.voiceaChannel) === null || _this$voiceaChannel8 === void 0 ? void 0 : _this$voiceaChannel8.getKeepTranscriptionSubscribed();
|
|
6885
6908
|
if (!keepTranscriptionSubscribed) {
|
|
6886
6909
|
return;
|
|
6887
6910
|
}
|
|
6888
|
-
|
|
6889
|
-
// @ts-ignore
|
|
6890
|
-
this.webex.internal.voicea.updateSubchannelSubscriptions({
|
|
6911
|
+
(_this$voiceaChannel9 = this.voiceaChannel) === null || _this$voiceaChannel9 === void 0 ? void 0 : _this$voiceaChannel9.updateSubchannelSubscriptions({
|
|
6891
6912
|
subscribe: ['transcription']
|
|
6892
6913
|
});
|
|
6893
6914
|
} catch (error) {
|
|
@@ -7098,10 +7119,6 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7098
7119
|
_this34.saveDataChannelToken(join);
|
|
7099
7120
|
// @ts-ignore - config coming from registerPlugin
|
|
7100
7121
|
if (_this34.config.enableAutomaticLLM) {
|
|
7101
|
-
// @ts-ignore
|
|
7102
|
-
_this34.webex.internal.llm.off('online', _this34.handleLLMOnline);
|
|
7103
|
-
// @ts-ignore
|
|
7104
|
-
_this34.webex.internal.llm.on('online', _this34.handleLLMOnline);
|
|
7105
7122
|
_this34.updateLLMConnection({
|
|
7106
7123
|
isInitialJoinPhase: true
|
|
7107
7124
|
}).catch(function (error) {
|
|
@@ -7141,11 +7158,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7141
7158
|
// first cancel any existing timer
|
|
7142
7159
|
this.clearLLMHealthCheckTimer();
|
|
7143
7160
|
this.llmHealthCheckTimer = setTimeout(function () {
|
|
7144
|
-
|
|
7145
|
-
var isConnected = _this35.
|
|
7161
|
+
var _this35$llmChannel$is, _this35$llmChannel;
|
|
7162
|
+
var isConnected = (_this35$llmChannel$is = (_this35$llmChannel = _this35.llmChannel) === null || _this35$llmChannel === void 0 ? void 0 : _this35$llmChannel.isConnected()) !== null && _this35$llmChannel$is !== void 0 ? _this35$llmChannel$is : false;
|
|
7146
7163
|
if (!isConnected) {
|
|
7147
|
-
|
|
7148
|
-
var hasEverConnected = _this35.
|
|
7164
|
+
var _this35$llmChannel$ha, _this35$llmChannel2;
|
|
7165
|
+
var hasEverConnected = (_this35$llmChannel$ha = (_this35$llmChannel2 = _this35.llmChannel) === null || _this35$llmChannel2 === void 0 ? void 0 : _this35$llmChannel2.hasEverConnected) !== null && _this35$llmChannel$ha !== void 0 ? _this35$llmChannel$ha : false;
|
|
7149
7166
|
|
|
7150
7167
|
// only send metric if not connected - to avoid too many metrics
|
|
7151
7168
|
_metrics.default.sendBehavioralMetric(_constants2.default.LLM_HEALTHCHECK_FAILURE, {
|
|
@@ -7183,10 +7200,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7183
7200
|
}, {
|
|
7184
7201
|
key: "stopListeningForLLMEvents",
|
|
7185
7202
|
value: function stopListeningForLLMEvents() {
|
|
7186
|
-
|
|
7187
|
-
this.
|
|
7188
|
-
|
|
7189
|
-
this.
|
|
7203
|
+
var _this$llmChannel2, _this$llmChannel3, _this$llmChannel4, _this$breakouts3;
|
|
7204
|
+
(_this$llmChannel2 = this.llmChannel) === null || _this$llmChannel2 === void 0 ? void 0 : _this$llmChannel2.off('event:relay.event', this.processRelayEvent);
|
|
7205
|
+
(_this$llmChannel3 = this.llmChannel) === null || _this$llmChannel3 === void 0 ? void 0 : _this$llmChannel3.off(_constants.LOCUS_LLM_EVENT, this.processLocusLLMEvent);
|
|
7206
|
+
(_this$llmChannel4 = this.llmChannel) === null || _this$llmChannel4 === void 0 ? void 0 : _this$llmChannel4.off('online', this.handleLLMOnline);
|
|
7207
|
+
(_this$breakouts3 = this.breakouts) === null || _this$breakouts3 === void 0 ? void 0 : _this$breakouts3.unregisterLLMChannel();
|
|
7208
|
+
// voiceaChannel persists across LLM reconnects; switchLLMChannel() handles re-subscribing
|
|
7190
7209
|
this.clearLLMHealthCheckTimer();
|
|
7191
7210
|
}
|
|
7192
7211
|
|
|
@@ -7211,30 +7230,31 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7211
7230
|
value: function stopListeningForMeetingEvents() {
|
|
7212
7231
|
this.stopListeningForLLMEvents();
|
|
7213
7232
|
this.stopListeningForMercuryEvents();
|
|
7214
|
-
if (this.
|
|
7233
|
+
if (this.areVoiceaEventsSetup) {
|
|
7215
7234
|
this.stopTranscription();
|
|
7216
|
-
this.transcription = undefined;
|
|
7217
7235
|
}
|
|
7236
|
+
// Reset to initial shape instead of null - transcription is always a valid object
|
|
7237
|
+
this.transcription = this.getInitialTranscription();
|
|
7218
7238
|
this.annotation.deregisterEvents();
|
|
7219
7239
|
}
|
|
7220
7240
|
}, {
|
|
7221
|
-
key: "
|
|
7241
|
+
key: "setLLMChannelDataToken",
|
|
7222
7242
|
value:
|
|
7223
7243
|
/**
|
|
7224
|
-
*
|
|
7225
|
-
*
|
|
7244
|
+
* Sets the datachannel token on the meeting's LLM channel.
|
|
7245
|
+
* Used by the DataChannelAuthTokenInterceptor after refreshing tokens.
|
|
7246
|
+
* @param {string} token - The new datachannel token
|
|
7226
7247
|
* @returns {void}
|
|
7227
7248
|
*/
|
|
7228
|
-
function
|
|
7229
|
-
|
|
7230
|
-
|
|
7231
|
-
// @ts-ignore
|
|
7232
|
-
this.webex.internal.llm.clearDatachannelToken(_constants.LLM_PRACTICE_SESSION, this.id);
|
|
7249
|
+
function setLLMChannelDataToken(token) {
|
|
7250
|
+
var _this$llmChannel5;
|
|
7251
|
+
(_this$llmChannel5 = this.llmChannel) === null || _this$llmChannel5 === void 0 ? void 0 : _this$llmChannel5.setDatachannelToken(token);
|
|
7233
7252
|
}
|
|
7234
7253
|
|
|
7235
7254
|
/**
|
|
7236
|
-
* Saves the data channel tokens from the join response
|
|
7237
|
-
*
|
|
7255
|
+
* Saves the data channel tokens from the join response.
|
|
7256
|
+
* Default session token is stored on this.llmChannel when available.
|
|
7257
|
+
* Practice session token is stored on the webinar's practice LLM channel.
|
|
7238
7258
|
* @param {Object} join - The parsed join response (from MeetingUtil.parseLocusJoin)
|
|
7239
7259
|
* @returns {void}
|
|
7240
7260
|
*/
|
|
@@ -7244,13 +7264,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7244
7264
|
var _join$locus, _join$locus$self, _join$locus2, _join$locus2$self;
|
|
7245
7265
|
var datachannelToken = join === null || join === void 0 ? void 0 : (_join$locus = join.locus) === null || _join$locus === void 0 ? void 0 : (_join$locus$self = _join$locus.self) === null || _join$locus$self === void 0 ? void 0 : _join$locus$self.datachannelToken;
|
|
7246
7266
|
var practiceSessionDatachannelToken = join === null || join === void 0 ? void 0 : (_join$locus2 = join.locus) === null || _join$locus2 === void 0 ? void 0 : (_join$locus2$self = _join$locus2.self) === null || _join$locus2$self === void 0 ? void 0 : _join$locus2$self.practiceSessionDatachannelToken;
|
|
7267
|
+
|
|
7268
|
+
// Store default session token on our LLM channel if it exists
|
|
7269
|
+
if (datachannelToken && this.llmChannel) {
|
|
7270
|
+
this.llmChannel.setDatachannelToken(datachannelToken);
|
|
7271
|
+
}
|
|
7272
|
+
|
|
7273
|
+
// Store the token temporarily for use when channel is created
|
|
7247
7274
|
if (datachannelToken) {
|
|
7248
|
-
|
|
7249
|
-
this.webex.internal.llm.setDatachannelToken(datachannelToken, _constants.LLM_DEFAULT_SESSION, this.id);
|
|
7275
|
+
this._pendingDatachannelToken = datachannelToken;
|
|
7250
7276
|
}
|
|
7277
|
+
|
|
7278
|
+
// Practice session token is handled by webinar
|
|
7251
7279
|
if (practiceSessionDatachannelToken) {
|
|
7252
|
-
|
|
7253
|
-
this.webex.internal.llm.setDatachannelToken(practiceSessionDatachannelToken, _constants.LLM_PRACTICE_SESSION, this.id);
|
|
7280
|
+
this.webinar.setPracticeSessionDatachannelToken(practiceSessionDatachannelToken);
|
|
7254
7281
|
}
|
|
7255
7282
|
}
|
|
7256
7283
|
|
|
@@ -7263,13 +7290,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7263
7290
|
key: "ensureDefaultDatachannelTokenAfterAdmit",
|
|
7264
7291
|
value: (function () {
|
|
7265
7292
|
var _ensureDefaultDatachannelTokenAfterAdmit = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee21() {
|
|
7266
|
-
var _response$body, datachannelToken, isDataChannelTokenEnabled, response, fetchedDatachannelToken, msg, _t14;
|
|
7293
|
+
var _this$llmChannel$getD, _this$llmChannel6, _response$body, datachannelToken, isDataChannelTokenEnabled, response, fetchedDatachannelToken, msg, _t14;
|
|
7267
7294
|
return _regenerator.default.wrap(function (_context21) {
|
|
7268
7295
|
while (1) switch (_context21.prev = _context21.next) {
|
|
7269
7296
|
case 0:
|
|
7270
7297
|
_context21.prev = 0;
|
|
7271
|
-
// @ts-ignore
|
|
7272
|
-
datachannelToken = this.webex.internal.llm.getDatachannelToken(_constants.LLM_DEFAULT_SESSION, this.id); // @ts-ignore
|
|
7298
|
+
datachannelToken = (_this$llmChannel$getD = (_this$llmChannel6 = this.llmChannel) === null || _this$llmChannel6 === void 0 ? void 0 : _this$llmChannel6.getDatachannelToken()) !== null && _this$llmChannel$getD !== void 0 ? _this$llmChannel$getD : this._pendingDatachannelToken; // @ts-ignore
|
|
7273
7299
|
_context21.next = 1;
|
|
7274
7300
|
return this.webex.internal.llm.isDataChannelTokenEnabled();
|
|
7275
7301
|
case 1:
|
|
@@ -7295,8 +7321,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7295
7321
|
}
|
|
7296
7322
|
return _context21.abrupt("return", false);
|
|
7297
7323
|
case 4:
|
|
7298
|
-
//
|
|
7299
|
-
|
|
7324
|
+
// Store on channel if exists, otherwise save as pending
|
|
7325
|
+
if (this.llmChannel) {
|
|
7326
|
+
this.llmChannel.setDatachannelToken(fetchedDatachannelToken);
|
|
7327
|
+
} else {
|
|
7328
|
+
this._pendingDatachannelToken = fetchedDatachannelToken;
|
|
7329
|
+
}
|
|
7300
7330
|
return _context21.abrupt("return", true);
|
|
7301
7331
|
case 5:
|
|
7302
7332
|
_context21.prev = 5;
|
|
@@ -7329,7 +7359,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7329
7359
|
key: "updateLLMConnection",
|
|
7330
7360
|
value: (function () {
|
|
7331
7361
|
var _updateLLMConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee22() {
|
|
7332
|
-
var
|
|
7362
|
+
var _this$_pendingDatacha,
|
|
7363
|
+
_this36 = this;
|
|
7333
7364
|
var _ref40,
|
|
7334
7365
|
_ref40$isInitialJoinP,
|
|
7335
7366
|
isInitialJoinPhase,
|
|
@@ -7342,12 +7373,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7342
7373
|
datachannelUrl,
|
|
7343
7374
|
isJoined,
|
|
7344
7375
|
dataChannelUrl,
|
|
7345
|
-
|
|
7346
|
-
currentOwner,
|
|
7347
|
-
wasConnected,
|
|
7376
|
+
isSameUrls,
|
|
7348
7377
|
datachannelToken,
|
|
7349
|
-
refreshHandlerOwnerMeetingId,
|
|
7350
|
-
shouldAlignRefreshHandlerAfterOwnershipClaim,
|
|
7351
7378
|
_args22 = arguments;
|
|
7352
7379
|
return _regenerator.default.wrap(function (_context22) {
|
|
7353
7380
|
while (1) switch (_context22.prev = _context22.next) {
|
|
@@ -7356,52 +7383,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7356
7383
|
// @ts-ignore - Fix type
|
|
7357
7384
|
_ref41 = this.locusInfo || {}, _ref41$url = _ref41.url, url = _ref41$url === void 0 ? undefined : _ref41$url, _ref41$info = _ref41.info, _ref41$info2 = _ref41$info === void 0 ? {} : _ref41$info, _ref41$info2$datachan = _ref41$info2.datachannelUrl, datachannelUrl = _ref41$info2$datachan === void 0 ? undefined : _ref41$info2$datachan;
|
|
7358
7385
|
isJoined = this.isJoined();
|
|
7359
|
-
dataChannelUrl = datachannelUrl; //
|
|
7360
|
-
|
|
7361
|
-
// it. Another meeting's `updateLLMConnection` must be ignored here to
|
|
7362
|
-
// avoid killing the socket it relies on. We only proceed to manage the
|
|
7363
|
-
// connection when this meeting is the current owner, or when no owner is
|
|
7364
|
-
// set yet (first claim).
|
|
7365
|
-
// @ts-ignore - Fix type
|
|
7366
|
-
_this$webex$internal$1 = this.webex.internal.llm.resolveSessionOwnership(this.id, _constants.LLM_DEFAULT_SESSION), currentOwner = _this$webex$internal$1.currentOwner; // Capture connectivity before any reconnect attempt. If LLM was already
|
|
7367
|
-
// connected, we must respect current ownership. If it was disconnected,
|
|
7368
|
-
// this flow may reclaim stale owner tags after a fresh connect.
|
|
7369
|
-
// @ts-ignore - Fix type
|
|
7370
|
-
wasConnected = this.webex.internal.llm.isConnected(); // Prefer ownership-scoped token read. For disconnected stale-owner reclaim
|
|
7371
|
-
// flows, fallback to ownerless read so initial register can still carry a
|
|
7372
|
-
// token and recover from stale ownership without 401/403 dead-end.
|
|
7373
|
-
// @ts-ignore - Fix type
|
|
7374
|
-
datachannelToken = this.webex.internal.llm.getDatachannelToken(_constants.LLM_DEFAULT_SESSION, this.id);
|
|
7375
|
-
if (!datachannelToken && !wasConnected && currentOwner && currentOwner !== this.id) {
|
|
7376
|
-
// @ts-ignore - Fix type
|
|
7377
|
-
datachannelToken = this.webex.internal.llm.getDatachannelToken(_constants.LLM_DEFAULT_SESSION);
|
|
7378
|
-
}
|
|
7379
|
-
|
|
7380
|
-
// @ts-ignore - Fix type
|
|
7381
|
-
if (!wasConnected) {
|
|
7386
|
+
dataChannelUrl = datachannelUrl; // If we have an existing channel, check if we should reuse it or clean it up
|
|
7387
|
+
if (!this.llmChannel) {
|
|
7382
7388
|
_context22.next = 3;
|
|
7383
7389
|
break;
|
|
7384
7390
|
}
|
|
7385
|
-
|
|
7391
|
+
isSameUrls = url === this.llmChannel.getLocusUrl() && dataChannelUrl === this.llmChannel.getDatachannelUrl(); // If already connected to same URLs, skip reconnect
|
|
7392
|
+
if (!(this.llmChannel.isConnected() && isSameUrls && isJoined)) {
|
|
7386
7393
|
_context22.next = 1;
|
|
7387
7394
|
break;
|
|
7388
7395
|
}
|
|
7389
|
-
// Another meeting owns the live LLM socket. We must not disconnect
|
|
7390
|
-
// or reconfigure it -- doing so would tear down a session the
|
|
7391
|
-
// owning meeting still relies on. Locus/datachannel URL mismatch is
|
|
7392
|
-
// expected here (each meeting has its own locus URL) and is NOT a
|
|
7393
|
-
// valid signal of staleness, so we never reclaim from this path.
|
|
7394
|
-
// The only safe reclaim mechanism is the `finally`-block owner-tag
|
|
7395
|
-
// release in `cleanupLLMConneciton`, which fires when this meeting
|
|
7396
|
-
// itself is being torn down.
|
|
7397
|
-
_loggerProxy.default.logger.info("Meeting:index#updateLLMConnection --> skipping; LLM owned by meeting ".concat(currentOwner, ", not ").concat(this.id));
|
|
7398
7396
|
return _context22.abrupt("return", undefined);
|
|
7399
7397
|
case 1:
|
|
7400
|
-
if (!(
|
|
7401
|
-
// @ts-ignore - Fix type
|
|
7402
|
-
url === this.webex.internal.llm.getLocusUrl() &&
|
|
7403
|
-
// @ts-ignore - Fix type
|
|
7404
|
-
dataChannelUrl === this.webex.internal.llm.getDatachannelUrl() && isJoined)) {
|
|
7398
|
+
if (!(this.llmChannel.isConnecting() && isSameUrls && isJoined)) {
|
|
7405
7399
|
_context22.next = 2;
|
|
7406
7400
|
break;
|
|
7407
7401
|
}
|
|
@@ -7409,7 +7403,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7409
7403
|
case 2:
|
|
7410
7404
|
_context22.next = 3;
|
|
7411
7405
|
return this.cleanupLLMConneciton({
|
|
7412
|
-
|
|
7406
|
+
preserveVoiceaChannel: true
|
|
7413
7407
|
});
|
|
7414
7408
|
case 3:
|
|
7415
7409
|
if (isJoined) {
|
|
@@ -7418,59 +7412,65 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7418
7412
|
}
|
|
7419
7413
|
return _context22.abrupt("return", undefined);
|
|
7420
7414
|
case 4:
|
|
7421
|
-
//
|
|
7415
|
+
// Create a new LLM channel for this meeting
|
|
7416
|
+
// @ts-ignore - Fix type
|
|
7417
|
+
this.llmChannel = this.webex.internal.llm.createChannel();
|
|
7418
|
+
|
|
7419
|
+
// Get token from pending (saved from join response) or channel
|
|
7420
|
+
datachannelToken = (_this$_pendingDatacha = this._pendingDatachannelToken) !== null && _this$_pendingDatacha !== void 0 ? _this$_pendingDatacha : this.llmChannel.getDatachannelToken(); // Set up refresh handler before registration so interceptor-triggered token
|
|
7422
7421
|
// refresh during register POST can resolve a valid handler.
|
|
7423
|
-
|
|
7424
|
-
// foreign owner tag is present on a disconnected session.
|
|
7425
|
-
refreshHandlerOwnerMeetingId = currentOwner && currentOwner !== this.id ? undefined : this.id;
|
|
7426
|
-
shouldAlignRefreshHandlerAfterOwnershipClaim = refreshHandlerOwnerMeetingId !== this.id; // @ts-ignore - Fix type
|
|
7427
|
-
this.webex.internal.llm.setRefreshHandler(function () {
|
|
7422
|
+
this.llmChannel.setRefreshHandler(function () {
|
|
7428
7423
|
return _this36.refreshDataChannelToken();
|
|
7429
|
-
}
|
|
7424
|
+
});
|
|
7430
7425
|
|
|
7431
|
-
//
|
|
7432
|
-
|
|
7426
|
+
// If we have a pending token, store it on the channel
|
|
7427
|
+
if (this._pendingDatachannelToken) {
|
|
7428
|
+
this.llmChannel.setDatachannelToken(this._pendingDatachannelToken);
|
|
7429
|
+
this._pendingDatachannelToken = undefined;
|
|
7430
|
+
}
|
|
7431
|
+
return _context22.abrupt("return", this.llmChannel.registerAndConnect(url, dataChannelUrl, datachannelToken).then(function (registerAndConnectResult) {
|
|
7432
|
+
var _this36$webinar, _this36$webinar$isPra, _this36$webinar2;
|
|
7433
7433
|
_this36.locusInfo.syncAllHashTreeDatasets({
|
|
7434
7434
|
onlyLLM: true
|
|
7435
7435
|
});
|
|
7436
|
-
|
|
7437
|
-
//
|
|
7438
|
-
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
//
|
|
7446
|
-
|
|
7447
|
-
|
|
7448
|
-
|
|
7449
|
-
// subsequent cross-meeting `updateLLMConnection` / `cleanupLLMConneciton`
|
|
7450
|
-
// calls can detect and skip work that doesn't belong to them.
|
|
7451
|
-
// @ts-ignore - Fix type
|
|
7452
|
-
(_this36$webex$interna2 = (_this36$webex$interna3 = _this36.webex.internal.llm).setOwnerMeetingId) === null || _this36$webex$interna2 === void 0 ? void 0 : _this36$webex$interna2.call(_this36$webex$interna3, _this36.id);
|
|
7453
|
-
|
|
7454
|
-
// If we pre-bound refresh ownerlessly (stale-owner reclaim path),
|
|
7455
|
-
// align the handler with the newly claimed owner immediately after
|
|
7456
|
-
// ownership is updated.
|
|
7457
|
-
if (shouldAlignRefreshHandlerAfterOwnershipClaim) {
|
|
7458
|
-
// @ts-ignore - Fix type
|
|
7459
|
-
_this36.webex.internal.llm.setRefreshHandler(function () {
|
|
7460
|
-
return _this36.refreshDataChannelToken();
|
|
7461
|
-
}, _constants.LLM_DEFAULT_SESSION, _this36.id);
|
|
7462
|
-
}
|
|
7436
|
+
|
|
7437
|
+
// Register event listeners on the channel
|
|
7438
|
+
_this36.llmChannel.off('event:relay.event', _this36.processRelayEvent);
|
|
7439
|
+
_this36.llmChannel.on('event:relay.event', _this36.processRelayEvent);
|
|
7440
|
+
_this36.llmChannel.off(_constants.LOCUS_LLM_EVENT, _this36.processLocusLLMEvent);
|
|
7441
|
+
_this36.llmChannel.on(_constants.LOCUS_LLM_EVENT, _this36.processLocusLLMEvent);
|
|
7442
|
+
_this36.llmChannel.off('online', _this36.handleLLMOnline);
|
|
7443
|
+
_this36.llmChannel.on('online', _this36.handleLLMOnline);
|
|
7444
|
+
|
|
7445
|
+
// Register annotation channel only if not in practice session
|
|
7446
|
+
// (practice session manages its own annotation channel via updatePSDataChannel)
|
|
7447
|
+
if (!((_this36$webinar = _this36.webinar) !== null && _this36$webinar !== void 0 && _this36$webinar.isJoinPracticeSessionDataChannel())) {
|
|
7448
|
+
_this36.annotation.registerChannel(_this36.llmChannel);
|
|
7463
7449
|
}
|
|
7464
|
-
|
|
7465
|
-
|
|
7466
|
-
|
|
7467
|
-
_this36.webex.internal.llm.on('event:relay.event', _this36.processRelayEvent);
|
|
7468
|
-
// @ts-ignore - Fix type
|
|
7469
|
-
_this36.webex.internal.llm.off(_constants.LOCUS_LLM_EVENT, _this36.processLocusLLMEvent);
|
|
7470
|
-
// @ts-ignore - Fix type
|
|
7471
|
-
_this36.webex.internal.llm.on(_constants.LOCUS_LLM_EVENT, _this36.processLocusLLMEvent);
|
|
7450
|
+
|
|
7451
|
+
// Register breakouts channel
|
|
7452
|
+
_this36.breakouts.registerLLMChannel(_this36.llmChannel);
|
|
7472
7453
|
_loggerProxy.default.logger.info('Meeting:index#updateLLMConnection --> enabled to receive relay events!');
|
|
7473
7454
|
_this36.startLLMHealthCheckTimer();
|
|
7455
|
+
|
|
7456
|
+
// Switch voiceaChannel to use the new LLM channel (preserves transcription state).
|
|
7457
|
+
// Skip if practice session is active - practice session manages its own voicea binding
|
|
7458
|
+
// via updatePSDataChannel, and switching here would break practice session captions.
|
|
7459
|
+
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;
|
|
7460
|
+
if (!_this36.voiceaChannel) {
|
|
7461
|
+
// @ts-ignore - Fix type
|
|
7462
|
+
_this36.voiceaChannel = _this36.webex.internal.voicea.createChannel();
|
|
7463
|
+
}
|
|
7464
|
+
if (!isPracticeSessionActive) {
|
|
7465
|
+
// Fire-and-forget: caption restoration shouldn't block LLM connection result.
|
|
7466
|
+
// transcription is always initialized (reset to initial shape, never null),
|
|
7467
|
+
// so no re-init needed here.
|
|
7468
|
+
_this36.voiceaChannel.switchLLMChannel(_this36.llmChannel).then(function () {
|
|
7469
|
+
_this36.startTranscriptionIfNeeded();
|
|
7470
|
+
}).catch(function (error) {
|
|
7471
|
+
_loggerProxy.default.logger.warn('Meeting:index#updateLLMConnection --> failed to switch voicea channel:', error);
|
|
7472
|
+
});
|
|
7473
|
+
}
|
|
7474
7474
|
if (registerAndConnectResult) {
|
|
7475
7475
|
var _this36$breakouts;
|
|
7476
7476
|
if (isInitialJoinPhase) {
|
|
@@ -7498,6 +7498,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7498
7498
|
llmLatency: llmLatency,
|
|
7499
7499
|
error: error
|
|
7500
7500
|
});
|
|
7501
|
+
|
|
7502
|
+
// Clean up the channel on failure
|
|
7503
|
+
_this36.llmChannel = undefined;
|
|
7501
7504
|
return _promise.default.reject(error);
|
|
7502
7505
|
}));
|
|
7503
7506
|
case 5:
|
|
@@ -7549,9 +7552,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7549
7552
|
}, {
|
|
7550
7553
|
key: "sendLLMConnectMetric",
|
|
7551
7554
|
value: function sendLLMConnectMetric(timings, error) {
|
|
7552
|
-
var _this$webex$internal$
|
|
7555
|
+
var _this$webex$internal$5, _this$webex$internal$6;
|
|
7553
7556
|
// @ts-ignore
|
|
7554
|
-
var llmWebsocketUrl = ((_this$webex$internal$
|
|
7557
|
+
var llmWebsocketUrl = ((_this$webex$internal$5 = (_this$webex$internal$6 = this.webex.internal.llm).getWebSocketUrl) === null || _this$webex$internal$5 === void 0 ? void 0 : _this$webex$internal$5.call(_this$webex$internal$6)) || undefined;
|
|
7555
7558
|
var _ref42 = timings || {},
|
|
7556
7559
|
_ref42$clientLLMDatac = _ref42.clientLLMDatachannelResponseTime,
|
|
7557
7560
|
clientLLMDatachannelResponseTime = _ref42$clientLLMDatac === void 0 ? 0 : _ref42$clientLLMDatac,
|
|
@@ -11077,6 +11080,39 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
11077
11080
|
}
|
|
11078
11081
|
return refreshDataChannelToken;
|
|
11079
11082
|
}()
|
|
11083
|
+
/**
|
|
11084
|
+
* Checks if the LLM channel is connected.
|
|
11085
|
+
* Handles practice session context automatically - returns practice session
|
|
11086
|
+
* LLM channel status when in practice session, main LLM channel status otherwise.
|
|
11087
|
+
* @returns {boolean} True if the appropriate LLM channel is connected
|
|
11088
|
+
*/
|
|
11089
|
+
)
|
|
11090
|
+
}, {
|
|
11091
|
+
key: "isLLMConnected",
|
|
11092
|
+
value: function isLLMConnected() {
|
|
11093
|
+
var _this$webinar3, _this$llmChannel$isCo, _this$llmChannel7;
|
|
11094
|
+
if ((_this$webinar3 = this.webinar) !== null && _this$webinar3 !== void 0 && _this$webinar3.isJoinPracticeSessionDataChannel()) {
|
|
11095
|
+
return this.webinar.isPracticeSessionLLMChannelConnected();
|
|
11096
|
+
}
|
|
11097
|
+
return (_this$llmChannel$isCo = (_this$llmChannel7 = this.llmChannel) === null || _this$llmChannel7 === void 0 ? void 0 : _this$llmChannel7.isConnected()) !== null && _this$llmChannel$isCo !== void 0 ? _this$llmChannel$isCo : false;
|
|
11098
|
+
}
|
|
11099
|
+
|
|
11100
|
+
/**
|
|
11101
|
+
* Gets the locus URL from the LLM channel.
|
|
11102
|
+
* Handles practice session context automatically - returns practice session
|
|
11103
|
+
* LLM channel's locus URL when in practice session, main LLM channel's locus URL otherwise.
|
|
11104
|
+
* @returns {string | undefined} The locus URL or undefined
|
|
11105
|
+
*/
|
|
11106
|
+
}, {
|
|
11107
|
+
key: "getLLMLocusUrl",
|
|
11108
|
+
value: function getLLMLocusUrl() {
|
|
11109
|
+
var _this$webinar4, _this$llmChannel8;
|
|
11110
|
+
if ((_this$webinar4 = this.webinar) !== null && _this$webinar4 !== void 0 && _this$webinar4.isJoinPracticeSessionDataChannel()) {
|
|
11111
|
+
return this.webinar.getPracticeSessionLocusUrl();
|
|
11112
|
+
}
|
|
11113
|
+
return (_this$llmChannel8 = this.llmChannel) === null || _this$llmChannel8 === void 0 ? void 0 : _this$llmChannel8.getLocusUrl();
|
|
11114
|
+
}
|
|
11115
|
+
|
|
11080
11116
|
/**
|
|
11081
11117
|
* Determines the current data channel token type based on the meeting state.
|
|
11082
11118
|
*
|
|
@@ -11084,7 +11120,6 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
11084
11120
|
*
|
|
11085
11121
|
* @returns {DataChannelTokenType} The token type representing the current session mode.
|
|
11086
11122
|
*/
|
|
11087
|
-
)
|
|
11088
11123
|
}, {
|
|
11089
11124
|
key: "getDataChannelTokenType",
|
|
11090
11125
|
value: function getDataChannelTokenType() {
|