@alan-ai/alan-sdk-web 1.8.35 → 1.8.36
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 +7 -4
- package/dist/alan_lib.min.js +1 -1
- package/package.json +1 -1
package/dist/alan_lib.js
CHANGED
|
@@ -780,7 +780,7 @@
|
|
|
780
780
|
|
|
781
781
|
/// <reference types="../global" />
|
|
782
782
|
(function (ns) {
|
|
783
|
-
var alanButtonVersion = '1.8.
|
|
783
|
+
var alanButtonVersion = '1.8.36';
|
|
784
784
|
if (window.alanBtn) {
|
|
785
785
|
console.warn('Alan: the Alan Button source code has already added (v.' + alanButtonVersion + ')');
|
|
786
786
|
}
|
|
@@ -813,6 +813,8 @@
|
|
|
813
813
|
return "\n Debug Info:\n alanBtn: v.".concat(alanButtonVersion, "\n alanSDK: v.").concat(window.alanSDKVersion, "\n projectId: ").concat(currentProjectId || 'unknown', "\n deviceId: ").concat(getDeviceId(), "\n navigator: \n getUserMedia: ").concat(printNavigatorFlag(navigator.getUserMedia), ", \n mediaDevices: ").concat(printNavigatorFlag(navigator.mediaDevices), ", \n mediaDevices.getUserMedia: ").concat(printNavigatorFlag(navigator.mediaDevices && navigator.mediaDevices.getUserMedia), ",\n webkitGUM: ").concat(printNavigatorFlag(navigator.webkitGetUserMedia), ",\n mozGUM: ").concat(printNavigatorFlag(navigator.mozGetUserMedia), ",\n msGUM: ").concat(printNavigatorFlag(navigator.msGetUserMedia), ",\n window:\n AudioContext: ").concat(printNavigatorFlag(window.AudioContext), ",\n webkitAC: ").concat(printNavigatorFlag(window.webkitAudioContext), ",\n mozAC: ").concat(printNavigatorFlag(window.mozAudioContext), ",\n userAgent: ").concat(navigator.userAgent, "\n ");
|
|
814
814
|
}
|
|
815
815
|
function getDeviceId() {
|
|
816
|
+
if (!currentProjectId)
|
|
817
|
+
return;
|
|
816
818
|
var deviceIdKey = 'alan-btn-uuid-' + currentProjectId;
|
|
817
819
|
if (isLocalStorageAvailable) {
|
|
818
820
|
deviceId = localStorage.getItem(deviceIdKey);
|
|
@@ -964,6 +966,7 @@
|
|
|
964
966
|
window.tutorProject.close();
|
|
965
967
|
window.tutorProject.off('scripts', onScriptsCb);
|
|
966
968
|
window.tutorProject.off('text', onTextCbInMicBtn);
|
|
969
|
+
window.tutorProject.off('parsed', onParsedCbInMicBtn);
|
|
967
970
|
rootEl.innerHTML = '';
|
|
968
971
|
btnInstance = null;
|
|
969
972
|
if (!isTutorMode()) {
|
|
@@ -1885,6 +1888,7 @@
|
|
|
1885
1888
|
window.tutorProject.on('options', onOptionsReceived);
|
|
1886
1889
|
window.tutorProject.on('scripts', onScriptsCb);
|
|
1887
1890
|
window.tutorProject.on('text', onTextCbInMicBtn);
|
|
1891
|
+
window.tutorProject.on('parsed', onParsedCbInMicBtn);
|
|
1888
1892
|
//window.tutorProject.on('popup', onPopup);
|
|
1889
1893
|
// console.info('BTN: tutorProject', options.key);
|
|
1890
1894
|
}
|
|
@@ -1992,8 +1996,8 @@
|
|
|
1992
1996
|
else {
|
|
1993
1997
|
sendClientEvent({ buttonClicked: true, micAllowed: true });
|
|
1994
1998
|
}
|
|
1995
|
-
})["catch"](function () {
|
|
1996
|
-
console.warn('Not possible to detect mic permissions');
|
|
1999
|
+
})["catch"](function (error) {
|
|
2000
|
+
console.warn('Not possible to detect mic permissions, details: ', error);
|
|
1997
2001
|
setTimeout(function () { return sendClientEvent({ buttonClicked: true, micAllowed: alanAudio.isMicAllowed() }); }, 300);
|
|
1998
2002
|
});
|
|
1999
2003
|
}
|
|
@@ -2434,7 +2438,6 @@
|
|
|
2434
2438
|
playSoundNext();
|
|
2435
2439
|
isAlanActive = true;
|
|
2436
2440
|
if (window.tutorProject) {
|
|
2437
|
-
window.tutorProject.on('parsed', onParsedCbInMicBtn);
|
|
2438
2441
|
window.tutorProject.on('recognized', onRecognizedCbInMicBtn);
|
|
2439
2442
|
window.tutorProject.on('connectStatus', onConnectStatusChange);
|
|
2440
2443
|
window.tutorProject.on('options', onOptionsReceived);
|