TIVI-2404: Handle case where tizen.speech is undefined
[profile/ivi/MediaPlayer.git] / js / main.js
index 5331259..243005a 100644 (file)
@@ -597,8 +597,12 @@ function init()
        //Setup voice control
        if (tizen.speech)
                setupSpeech();
-       else
+       else {
                console.log("MediaPlayer: Speech Recognition not running, voice control will be unavailable");
+                speechObj = {
+                    vocalizeString: function(item) { console.log(item); }
+                }; 
+        }
 
        audioPlayer = new MediaPlayer("audio");
        videoPlayer = new MediaPlayer("video");