Determine if the camera is in use?

The docs say

If getCamera () returns null, either the camera is in use by another application, or there are no cameras installed on the system. to determine if any cameras are installed, use the names.length property

So, in order to determine that the camera is done, I have to check if (Camera.getCamera() == null && Camera.names.length > 0)

, right?

I can duplicate the use of my webcam by another app by opening Webcam Toy in IE and then trying to debug my app in Chrome, but Camera.getCamera()

it still returns a camera object even though I can't see from my webcam.

If I disable IE app and reload my app in Chrome I see it again.

Incorrect documentation or am I wrong?

+3


source to share


1 answer


Hope this helps. I wrote a blog post a while ago about detecting multiple cameras and setting the default in AS3. We hope you find this information helpful.

Blog post: http://www.charlesclements.net/blog/flash-as3-setting-default-camera-part-2/



Source files: http://www.charlesclements.net/blog/swfs/camera_detection/UseDefaultCameras_201203141746.zip

0


source







All Articles