@alan-ai/alan-sdk-web 1.8.29 → 1.8.30
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 +10 -7
- package/dist/alan_lib.min.js +1 -1
- package/package.json +1 -1
package/dist/alan_lib.js
CHANGED
|
@@ -781,7 +781,7 @@
|
|
|
781
781
|
(function(ns) {
|
|
782
782
|
"use strict";
|
|
783
783
|
|
|
784
|
-
var alanButtonVersion = '1.8.
|
|
784
|
+
var alanButtonVersion = '1.8.30';
|
|
785
785
|
|
|
786
786
|
if (window.alanBtn) {
|
|
787
787
|
console.warn('Alan: the Alan Button source code has already added (v.' + alanButtonVersion + ')');
|
|
@@ -1487,6 +1487,7 @@ function alanBtn(options) {
|
|
|
1487
1487
|
}
|
|
1488
1488
|
|
|
1489
1489
|
applySizeSettingsToBlurLayers([btnOval1, btnOval2]);
|
|
1490
|
+
setTextPanelPosition(recognisedTextHolder);
|
|
1490
1491
|
}
|
|
1491
1492
|
|
|
1492
1493
|
// Define base styles for btn
|
|
@@ -2722,10 +2723,10 @@ function alanBtn(options) {
|
|
|
2722
2723
|
}
|
|
2723
2724
|
|
|
2724
2725
|
if (data && data.web && data.web.hidden === true) {
|
|
2725
|
-
|
|
2726
|
+
hideBtn();
|
|
2726
2727
|
} else {
|
|
2727
2728
|
// sendClientEvent({ buttonReady: true });
|
|
2728
|
-
|
|
2729
|
+
showBtn();
|
|
2729
2730
|
}
|
|
2730
2731
|
}
|
|
2731
2732
|
|
|
@@ -2938,7 +2939,9 @@ function alanBtn(options) {
|
|
|
2938
2939
|
if (options.onCommand) {
|
|
2939
2940
|
options.onCommand(e.data);
|
|
2940
2941
|
}
|
|
2941
|
-
|
|
2942
|
+
if (isAlanActive) {
|
|
2943
|
+
switchState(LISTENING);
|
|
2944
|
+
}
|
|
2942
2945
|
turnOffVoiceFn();
|
|
2943
2946
|
}
|
|
2944
2947
|
|
|
@@ -3417,7 +3420,7 @@ function alanBtn(options) {
|
|
|
3417
3420
|
//#endregion
|
|
3418
3421
|
|
|
3419
3422
|
//#region Append layers to the rootEl
|
|
3420
|
-
function
|
|
3423
|
+
function showBtn() {
|
|
3421
3424
|
rootEl.innerHTML = '';
|
|
3422
3425
|
|
|
3423
3426
|
recognisedTextHolder.appendChild(recognisedTextContent);
|
|
@@ -3428,7 +3431,7 @@ function alanBtn(options) {
|
|
|
3428
3431
|
sendClientEvent({ buttonReady: true });
|
|
3429
3432
|
}
|
|
3430
3433
|
|
|
3431
|
-
function
|
|
3434
|
+
function hideBtn() {
|
|
3432
3435
|
if (!isTutorMode()) {
|
|
3433
3436
|
alanAudio.stop();
|
|
3434
3437
|
rootEl.innerHTML = '';
|
|
@@ -3505,7 +3508,7 @@ function alanBtn(options) {
|
|
|
3505
3508
|
var alanBtnSavedOptions = null;
|
|
3506
3509
|
|
|
3507
3510
|
if (isTutorMode()) {
|
|
3508
|
-
|
|
3511
|
+
showBtn();
|
|
3509
3512
|
} else {
|
|
3510
3513
|
if (isLocalStorageAvailable) {
|
|
3511
3514
|
try {
|