Skip to content

Commit c161961

Browse files
committed
added 'insecure origin' info to 'microphone permission denied' error as well;
1 parent f036af0 commit c161961

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

www/scripts/sepiaFW.speech.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,13 @@ function sepiaFW_build_speech(){
344344
}
345345
function broadcastWrongAsrSettings(){
346346
//EXAMPLE:
347-
SepiaFW.ui.showInfo(SepiaFW.local.g('asrSettingsProblem'));
347+
var msg = SepiaFW.local.g('asrSettingsProblem');
348+
if (!SepiaFW.ui.isSecureContext){
349+
msg += " " + SepiaFW.local.g('possible_reason_origin_unsecure')
350+
+ " - <a href='https://github.com/SEPIA-Framework/sepia-docs/wiki/SSL-for-your-Server' target=_blank style='color: inherit;'>"
351+
+ SepiaFW.local.g('help') + "!</a>";
352+
}
353+
SepiaFW.ui.showInfo(msg);
348354
}
349355
function broadcastNoAsrSupport(){
350356
//EXAMPLE:

www/scripts/sepiaFW.speechWebSocket.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,13 @@ function sepiaFW_build_speechWebSocket(){
7070
}
7171
function broadcastWrongAsrSettings(){
7272
//EXAMPLE:
73-
SepiaFW.ui.showInfo(SepiaFW.local.g('asrSettingsProblem'));
73+
var msg = SepiaFW.local.g('asrSettingsProblem');
74+
if (!SepiaFW.ui.isSecureContext){
75+
msg += " " + SepiaFW.local.g('possible_reason_origin_unsecure')
76+
+ " - <a href='https://github.com/SEPIA-Framework/sepia-docs/wiki/SSL-for-your-Server' target=_blank style='color: inherit;'>"
77+
+ SepiaFW.local.g('help') + "!</a>";
78+
}
79+
SepiaFW.ui.showInfo(msg);
7480
}
7581
function broadcastNoAsrSupport(){
7682
//EXAMPLE:

0 commit comments

Comments
 (0)