ttp-agent-sdk 2.34.5 → 2.34.6

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.
@@ -16090,7 +16090,7 @@ var VoiceInterface = /*#__PURE__*/function () {
16090
16090
  value: (function () {
16091
16091
  var _proceedWithVoiceCall = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5() {
16092
16092
  var _this3 = this;
16093
- var isResumeCall, panel, header, toggleText, _voiceInterface, originalSection, compactSection, idleState, _panel, fallbackPanel, sampleRate, mediaStream, floatingButton, fallbackButton, _idleState, _panel2, _fallbackPanel, deviceInfo, _idleState2, activeState, voiceInterface, signedUrl, connected, serverRejected, originalOnError, originalOnDisconnected, attempts, _this$sdk$voiceSDK, error, _idleState3, _panel3, _fallbackPanel2, _floatingButton, _fallbackButton, _idleState4, _panel4, _fallbackPanel3, _floatingButton2, _fallbackButton2, _deviceInfo, _t2, _t3, _t4, _t5, _t6, _t7;
16093
+ var isResumeCall, panel, header, toggleText, _voiceInterface, originalSection, compactSection, idleState, _panel, fallbackPanel, sampleRate, mediaStream, floatingButton, fallbackButton, _idleState, _panel2, _fallbackPanel, deviceInfo, _idleState2, activeState, voiceInterface, signedUrl, connected, serverRejected, originalOnError, originalOnDisconnected, attempts, _this$sdk$voiceSDK, error, _idleState3, _panel3, _fallbackPanel2, _floatingButton, _fallbackButton, updateTimer, _idleState4, _panel4, _fallbackPanel3, _floatingButton2, _fallbackButton2, _updateTimer, _deviceInfo, _t2, _t3, _t4, _t5, _t6, _t7;
16094
16094
  return _regenerator().w(function (_context5) {
16095
16095
  while (1) switch (_context5.p = _context5.n) {
16096
16096
  case 0:
@@ -16487,7 +16487,9 @@ var VoiceInterface = /*#__PURE__*/function () {
16487
16487
  case 29:
16488
16488
  // Start timer
16489
16489
  this.callStartTime = Date.now();
16490
- this.callTimerInterval = setInterval(function () {
16490
+
16491
+ // Timer update function - updates all timer elements
16492
+ updateTimer = function updateTimer() {
16491
16493
  var elapsed = Date.now() - _this3.callStartTime;
16492
16494
  var minutes = Math.floor(elapsed / 60000);
16493
16495
  var seconds = Math.floor(elapsed % 60000 / 1000);
@@ -16498,12 +16500,19 @@ var VoiceInterface = /*#__PURE__*/function () {
16498
16500
  if (timerEl) {
16499
16501
  timerEl.textContent = timerText;
16500
16502
  }
16501
- // Update timer in compact or old layout
16503
+ // Update timer in compact or old layout (update both independently)
16502
16504
  var compactTimerText = _this3.shadowRoot.getElementById('compactTimerText');
16503
16505
  var desktopTimerText = _this3.shadowRoot.getElementById('desktopTimerText');
16504
- var timerElement = compactTimerText || desktopTimerText;
16505
- if (timerElement) {
16506
- timerElement.textContent = timerText;
16506
+
16507
+ // Debug logging
16508
+ if (!compactTimerText && !desktopTimerText) {
16509
+ console.warn('⚠️ Timer elements not found - compactTimerText:', !!compactTimerText, 'desktopTimerText:', !!desktopTimerText);
16510
+ }
16511
+ if (compactTimerText) {
16512
+ compactTimerText.textContent = timerText;
16513
+ }
16514
+ if (desktopTimerText) {
16515
+ desktopTimerText.textContent = timerText;
16507
16516
  }
16508
16517
 
16509
16518
  // Update mobile duration badge
@@ -16513,7 +16522,10 @@ var VoiceInterface = /*#__PURE__*/function () {
16513
16522
  if (mobileDurationText) mobileDurationText.textContent = timerText;
16514
16523
  if (mobileHeaderDuration) mobileHeaderDuration.textContent = timerText;
16515
16524
  }
16516
- }, 1000);
16525
+ }; // Update immediately (don't wait for first interval)
16526
+ updateTimer();
16527
+ // Then update every second
16528
+ this.callTimerInterval = setInterval(updateTimer, 1000);
16517
16529
  _context5.n = 38;
16518
16530
  break;
16519
16531
  case 30:
@@ -16616,7 +16628,9 @@ var VoiceInterface = /*#__PURE__*/function () {
16616
16628
  case 37:
16617
16629
  // Start timer
16618
16630
  this.callStartTime = Date.now();
16619
- this.callTimerInterval = setInterval(function () {
16631
+
16632
+ // Timer update function - updates all timer elements
16633
+ _updateTimer = function _updateTimer() {
16620
16634
  var elapsed = Date.now() - _this3.callStartTime;
16621
16635
  var minutes = Math.floor(elapsed / 60000);
16622
16636
  var seconds = Math.floor(elapsed % 60000 / 1000);
@@ -16627,12 +16641,19 @@ var VoiceInterface = /*#__PURE__*/function () {
16627
16641
  if (timerEl) {
16628
16642
  timerEl.textContent = timerText;
16629
16643
  }
16630
- // Update timer in compact or old layout
16644
+ // Update timer in compact or old layout (update both independently)
16631
16645
  var compactTimerText = _this3.shadowRoot.getElementById('compactTimerText');
16632
16646
  var desktopTimerText = _this3.shadowRoot.getElementById('desktopTimerText');
16633
- var timerElement = compactTimerText || desktopTimerText;
16634
- if (timerElement) {
16635
- timerElement.textContent = timerText;
16647
+
16648
+ // Debug logging
16649
+ if (!compactTimerText && !desktopTimerText) {
16650
+ console.warn('⚠️ Timer elements not found - compactTimerText:', !!compactTimerText, 'desktopTimerText:', !!desktopTimerText);
16651
+ }
16652
+ if (compactTimerText) {
16653
+ compactTimerText.textContent = timerText;
16654
+ }
16655
+ if (desktopTimerText) {
16656
+ desktopTimerText.textContent = timerText;
16636
16657
  }
16637
16658
 
16638
16659
  // Update mobile duration badge
@@ -16642,7 +16663,10 @@ var VoiceInterface = /*#__PURE__*/function () {
16642
16663
  if (mobileDurationText) mobileDurationText.textContent = timerText;
16643
16664
  if (mobileHeaderDuration) mobileHeaderDuration.textContent = timerText;
16644
16665
  }
16645
- }, 1000);
16666
+ }; // Update immediately (don't wait for first interval)
16667
+ _updateTimer();
16668
+ // Then update every second
16669
+ this.callTimerInterval = setInterval(_updateTimer, 1000);
16646
16670
  case 38:
16647
16671
  console.log('✅ Voice call started successfully');
16648
16672
  _context5.n = 44;