@alan-ai/alan-sdk-web 1.8.37 → 1.8.39

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.37';
784
+ var alanButtonVersion = '1.8.39';
784
785
  if (window.alanBtn) {
785
786
  console.warn('Alan: the Alan Button source code has already added (v.' + alanButtonVersion + ')');
786
787
  }
@@ -2031,6 +2032,19 @@
2031
2032
  firstClick = true;
2032
2033
  sendClientEvent({ firstClick: true });
2033
2034
  }
2035
+ if (state === 'default') {
2036
+ coldPlayForSoundNext();
2037
+ }
2038
+ if (currentErrMsg) {
2039
+ if (currentErrMsg === MIC_BLOCKED_MSG) {
2040
+ sendClientEvent({ buttonClicked: true, micAllowed: false });
2041
+ showAlert(currentErrMsg);
2042
+ }
2043
+ else {
2044
+ showAlert(currentErrMsg);
2045
+ }
2046
+ return;
2047
+ }
2034
2048
  var activatePromise = new Promise(function (resolve, reject) {
2035
2049
  if (btnDisabled) {
2036
2050
  reject({ err: BTN_IS_DISABLED_CODE });
@@ -2250,19 +2264,8 @@
2250
2264
  if (!dndBackAnimFinished)
2251
2265
  return;
2252
2266
  hidePopup(null);
2253
- if (currentErrMsg) {
2254
- if (currentErrMsg === MIC_BLOCKED_MSG) {
2255
- sendClientEvent({ buttonClicked: true, micAllowed: false });
2256
- showAlert(currentErrMsg);
2257
- }
2258
- else {
2259
- showAlert(currentErrMsg);
2260
- }
2261
- return;
2262
- }
2263
2267
  if (alanAudio) {
2264
2268
  if (state === 'default') {
2265
- coldPlayForSoundNext();
2266
2269
  activateAlanButton();
2267
2270
  }
2268
2271
  else {