tags:

views:

299

answers:

1

In the combo Silverlight/Flex UI that I'm working on, I sometimes need to make the SWF/Flash object hosting the user's webcam smaller than 214x137. But if I make the flash object that small before the user has selected "Accept" in the webcam dialog box, Flash won't allow the user to click on the "Accept" button. (And if I make it that small before trying to publish the stream, the dialog box never appears at all.) I think my best solution is to wait until the user has selected "Accept", and then reduce the size of the flash object. But I can't figure out how to tell whether that's happened in Actionscript. All the NetConnection and NetStream events seem to get fired identically whether or not the "Accept" button has been selected. Any suggestions?

A: 

If you want to find out if the user allowed the camera to be broadcast, just subscribe to the StatusEvent.STATUS event coming off of your Camera object. When you get that event just look at your Camera object's "muted" property. If it's true, they didn't allow the camera.

Branden Hall