Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How do I detect that a camera is being used by another application?

Community Beginner ,
Nov 17, 2014 Nov 17, 2014

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 whether any cameras are installed, use the names.length property

So to detect that the camera is taken, I should be able to check if (Camera.getCamera() == null && Camera.names.length > 0), right?

I can duplicate having my webcam "taken" by another application by opening Webcam Toy in IE, and then trying to debug my application in Chrome, but Camera.getCamera() still returns a camera object, even when I can't see the feed from my webcam.

If I turn off the IE application and restart my app in Chrome, I can see the feed again.

Is the documentation wrong, or am I wrong?

TOPICS
ActionScript
407
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation