mirror of
https://github.com/bckelley/cgm-remote-monitor.git
synced 2026-08-24 03:14:12 -05:00
Merge pull request #4371 from nightscout/wip/allow_speech_on_ios
Improvement: causes client to say Ok Ok when the alarm test button is…
This commit is contained in:
@@ -1046,6 +1046,14 @@ client.load = function load(serverSettings, callback) {
|
||||
});
|
||||
|
||||
$('#testAlarms').click(function(event) {
|
||||
|
||||
// Speech synthesis also requires on iOS that user triggers a speech event for it to speak anything
|
||||
if (client.plugins('speech').isEnabled) {
|
||||
var msg = new SpeechSynthesisUtterance('Ok ok.');
|
||||
msg.lang = 'en-US';
|
||||
window.speechSynthesis.speak(msg);
|
||||
}
|
||||
|
||||
d3.selectAll('.audio.alarms audio').each(function () {
|
||||
var audio = this;
|
||||
playAlarm(audio);
|
||||
|
||||
Reference in New Issue
Block a user