x-webkit-speech, how to auto click the mic icon to

2019-04-24 23:20发布

问题:

I am working on chrome browser. The code <input x-webkit-speech> will show this:

if you click the mic icon, you can input speech. like this


My question is how to make it record voice to recognize automatically, without manually click the mic icon?
Such as when the page loaded, it start to record; or write codes to emulate a click event? Is it possible?
May you give a sample code or x-webkit-speech API's document?
Thank you.

回答1:

This should not be possible, because if it were it would be a privacy hazard — a page could start recording what is said in the vicinity without the user being aware of it or intending to. If there is any way to accomplish this, it will most certainly be removed as soon as the browser developers become aware of the problem.