lundi 21 août 2017

misunderstanding of web API source code

I want to build a web speech recognition and I met with some difficulties with the source code that I took it from google developers web site

 `if (!('webkitSpeechRecognition' in window)) {
  upgrade();
  } else {
  var recognition = new webkitSpeechRecognition();
  recognition.continuous = true;
recognition.interimResults = true;     
recognition.onstart = function() { ... }
recognition.onresult = function(event) { ... }
recognition.onerror = function(event) { ... }
recognition.onend = function() { ... }
...`   

So my problem I want to know about upgrade():
1- what does it mean?
2- what it's role exactly?

thanks for your your answers :) ...




Aucun commentaire:

Enregistrer un commentaire