From 6d7da3c2ef60514fabcf5fe1a3194091577e3a93 Mon Sep 17 00:00:00 2001 From: "M.A. Azhar Ameen" Date: Sun, 24 Nov 2019 12:33:36 +0530 Subject: [PATCH] artyom.js getVoice prototype For android cordova app SpeechSynthesis vocies comes under _list object. added an condition to support both platforms --- build/artyom.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/build/artyom.js b/build/artyom.js index 15227e2..4b83a55 100644 --- a/build/artyom.js +++ b/build/artyom.js @@ -1077,9 +1077,15 @@ var Artyom = (function () { var voices = speechSynthesis.getVoices(); var voicesLength = voiceIdentifiersArray.length; var _loop_1 = function (i) { - var foundVoice = voices.filter(function (voice) { - return ((voice.name == voiceIdentifiersArray[i]) || (voice.lang == voiceIdentifiersArray[i])); - })[0]; + if (voices._list) { + var foundVoice = voices._list.filter(function (voice) { + return ((voice.name == voiceIdentifiersArray[i]) || (voice.lang == voiceIdentifiersArray[i])); + })[0]; + } else { + var foundVoice = voices.filter(function (voice) { + return ((voice.name == voiceIdentifiersArray[i]) || (voice.lang == voiceIdentifiersArray[i])); + })[0]; + } if (foundVoice) { voice = foundVoice; return "break";