开发者

how to turn off web camera in IE using action script

I am using flash professional for take photo from webcam. My requirement is that I want to start camera and after 2 sec it will take photo and turn off the camera.

I did that and its working good in all browser except IE. Actually, I am display:none that flash object after photo 开发者_如何学JAVAtake, and it will automatically turn off camera in browser except IE.

If I display:none camera flash object, it will not turn off my webcam.

So, can you please help me in how to turn off web camera in IE.

Thank you.


I figured out.

I called action script function from java script. In action script function I just pass null to attachCamera function like this way - "video.attachCamera(null);"

null will turn off camera.

and its working in all browser.


I would not expect that to work well in all browsers (as you noticed). It would be better to send a function call to the flash file telling it to do whatever is needed to turn off the camera (deteach the camera from the screen I guess), using ExternalInterface.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜