In the newest version of Chrome when a flash application seeks webcam permission the user is presented with two permission dialogs:
In order for flash to access to the webcam media stream the user must accept BOTH the flash security dialog AND the chrome security dialog. The problem is that (as far as I know) there is no way to determine if / when the user has accepted or rejected the native permissions bar.
We tried getting webcam permission from chrome before starting flash recording (using getUserMedia) but as it turns out when flash goes to record it triggers a second security prompt for a new media stream (that is to say chrome authorizes each stream not each page).
This new "feature" seems to have been poorly thought out and is going to kill flash video recording / streaming apps.
Is anyone aware of a way to get the callback (success / failure) from the security bar that is triggered by flash attempting to access the webcam?
If user has checked Allow and Remember options in Flash privacy panel, you can watch microphone's activityLevel attribute. After user will click on accept button, activityLevel will change value from -1 to 0 or positive number.
To detect click on deny button, you have to detect that system notification was closed. To do that watch for changes of window.height attribute in JavaScript.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With