@alan-ai/alan-sdk-web 1.8.36 → 1.8.38

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/alan_lib.js CHANGED
@@ -580,6 +580,7 @@
580
580
  return;
581
581
  }
582
582
  if (nowPlaying && !audioQueue.length) {
583
+ getAudioElement().setAttribute("src", "");
583
584
  onPlayStop();
584
585
  }
585
586
  if (!audioQueue.length || playState === PLAY_ACTIVE) {
@@ -780,7 +781,7 @@
780
781
 
781
782
  /// <reference types="../global" />
782
783
  (function (ns) {
783
- var alanButtonVersion = '1.8.36';
784
+ var alanButtonVersion = '1.8.38';
784
785
  if (window.alanBtn) {
785
786
  console.warn('Alan: the Alan Button source code has already added (v.' + alanButtonVersion + ')');
786
787
  }
@@ -2027,6 +2028,10 @@
2027
2028
  }
2028
2029
  }
2029
2030
  function activateAlanButton() {
2031
+ if (!firstClick) {
2032
+ firstClick = true;
2033
+ sendClientEvent({ firstClick: true });
2034
+ }
2030
2035
  var activatePromise = new Promise(function (resolve, reject) {
2031
2036
  if (btnDisabled) {
2032
2037
  reject({ err: BTN_IS_DISABLED_CODE });
@@ -2246,10 +2251,6 @@
2246
2251
  if (!dndBackAnimFinished)
2247
2252
  return;
2248
2253
  hidePopup(null);
2249
- if (!firstClick) {
2250
- firstClick = true;
2251
- sendClientEvent({ firstClick: true });
2252
- }
2253
2254
  if (currentErrMsg) {
2254
2255
  if (currentErrMsg === MIC_BLOCKED_MSG) {
2255
2256
  sendClientEvent({ buttonClicked: true, micAllowed: false });