4

I'm porting my web app over to a Chrome packaged app and I heavily use the Web Audio API (which works great), but I use getUserMedia() to get line in audio. Normally a status bar comes down asking for permission from the user. In a packaged app this does not happen and error 1 (permission denied) is thrown. Has anyone had any experience with this in a packaged app setting or know if there is a certain permission I need to add?

Oh, I also did some research and found some bugs filed with chrome on it but I don't know if any of them have been implemented yet.

Steel
  • 55
  • 5

1 Answers1

8

You have to add the proper permissions in your manifest.json. Then it should inform the user when they install your app.

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

You can use one or the other depending on what type of request you're passing as a parameter to getUserMedia(), that is {audio:true} or {video:true}, respectively.

Community
  • 1
  • 1
codeisforeva
  • 471
  • 5
  • 20
  • Awesome. That worked perfectly. I couldn't find it in Chromes documentation. Thanks alot! – Steel Dec 02 '12 at 14:18
  • The docs are little confusing in that they say these aren't possible. A little poking around and some testing proved that to be not true. Cheers. – codeisforeva Dec 02 '12 at 22:12