views:

750

answers:

1

I'm working on a flex application which needs access to the microphone. By default, the security preferences show up when our application tries to access the mic, but we would like to know what the value of these settings are before the mic is actually being used for recording. This would enable us to display help to the user, for instance, if they accidentally hit "deny" and then wondering why they don't hear anything when speaking into the mic. It would also allow us to call Security.showSettings() earlier in the application's lifetime if we see that the user hasn't yet granted our app permission -- which means that the flash preference popup doesn't bother the user when the actual recording part of our app starts running.

Is there any way to actually read the values of the security preferences for our site at runtime? Or is it only possible to show the security settings panel to the user?

+1  A: 

You might want to try playing with the Microphone.muted and Camera.muted properties to see if they'll give you what you're looking for.

From the docs (for Camera.muted):

"A Boolean value indicating whether the user has denied access to the camera ( true ) or allowed access ( false ) in the Flash Player Privacy dialog box. When this value changes, the status event is dispatched."

joshbuhler
Thanks -- this works great! We had to use a combination of a few other conditions to get this working... would be nice if there was some API to just query the Security settings in general, but in the meantime, this will have to do.
Nik Reiman