How can I tell if a user has selected the Accept button in the Flash webcam security dialog?

In a Silverlight / Flex combo interface I'm working on, I sometimes need to make a SWF / Flash object that hosts the user's webcam less than 214x137. But if I make the Flash object small before the user selects “Accept” in the webcam dialog, Flash will prevent the user from clicking the “Accept” button. (And if I make it that small before trying to post the stream, the dialog never appears at all.) I think my best solution is to wait until the user chooses Accept and then shrinks the size of the Flash object, But I can't figure out how to say this in ActionScript. It seems that all NetConnection and NetStream events are fired the same regardless of whether the Accept button is selected. Any suggestions?

+2


source to share


1 answer


If you want to know if the user is allowed to broadcast the camera, simply subscribe to the StatusEvent.STATUS event coming off the Camera object. When you receive this event, just look at the Muted object of the Camera object. If that's true, they didn't let the camera.



+2


source







All Articles