views:

1161

answers:

2

I have an application with a WPF WebBrowser control which displays a Flash file. The flash file is used for WebCam/Microphone chat. At the moment, everytime the flash is loaded it displays a dialog box asking for permission to use the microphone and camera.

How can I fake a click on the allow button to stop hassling users with this question? Its obviously not possible natively within flash or the WebBrowser, but I think I can send events/messages to the ActiveX object in the WebBrowser control.

+1  A: 

You would have to author a full, native ActiveX control. The managed code is going to be sandboxed, and unable to make any P/Invoke calls.

Also, I suspect/wonder if in the case of protected mode IE7/8, if even the trick of using a Full ActiveX control + SendKeys (or the other equivalent of this) would fail.

Note, that at a very basic level, you're trying to circumvent the security policy of flash -- which at the end of the day, is just bad form.

dhopton
The thing is, I am hosting the flash in a full-trust application which will require proper installation. My managed code will not be sandboxed and as such I can make any P/Invoke calls I like.
vanja.
A: 

if you have administrator permissions you can share this file on the local machine and then navigate to it, this will ask for the user's permission, I tried that, but this was on internal application and I had full access to all the infrastructure, make sure you navegate using the IP addess , file://127.0.0.1//ShareFolderName/file.swf , and don't use the machine name or the localhost

this should help if you don't have any problem shearing that files