Applications with a Chrome package: permission to enter audio input getUserMedia ()

I port my web application to the application installed on Chrome and I use the web audio API (which works great) heavily, but I use getUserMedia () to get the string in the audio. Typically, a status bar appears asking for user permission. In a packaged application, this does not happen, and error 1 (permission denial) occurs. Has anyone had experience with this in the settings of a batch application or knew if there is a specific permission that I need to add?

Oh, I also did some research and found some errors filed with chrome on it, but I don’t know if any of them were completed.

+4
source share
1 answer

You must add the correct permissions to your manifest. json Then he should inform the user when he installs your application.

"permissions": [ "audioCapture", "videoCapture" ] 

You can use this or that option depending on what type of request you pass as the getUserMedia () parameter, that is {audio: true} or {video: true}, respectively.

+8
source

All Articles