How can a Chrome extension get a user's permission to use user's computer's microphone? -


if run html5's web speech api's javascript codes below in website on chrome, chrome ask user's permission use of user's computer's microphone.

var recognition = new webkitspeechrecognition(); recognition.start(); 

but if run codes above on chrome extension's page, chrome doesn't ask users give permission. how can chrome extension user's permission use user's computer's microphone?

thank you.

i think have implement yourself. in chrome extension's manifest.json, there permissions parameter. think first have permission use microphone in file. don't know parameter called can check in documentation.

this permission warning shown when user installs extension. after that, extension can turn microphone on/off @ volition. seek permission user, first check website user using , if want activate microphone on that. after that, inject html/css code in webpage show popup user asking permission. if permission yes, send message background page , turn on.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

java - More than one row with the given identifier was found: 1, for class: com.model.Diagnosis -