Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flash vs Native Webcam Permissions in Chrome 28

In the newest version of Chrome when a flash application seeks webcam permission the user is presented with two permission dialogs:

  1. The traditional Flash security dialog in the flash movie
  2. The Chrome native security bar under the address bar (What you see when you use getUserMedia)

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?

like image 392
cdanzig Avatar asked Jun 28 '13 16:06

cdanzig


1 Answers

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.

like image 129
gecko Avatar answered Oct 18 '22 10:10

gecko