How to get all available cameras using ActionScript?

I can get the default camera as follows:

Camera.getCamera();

But how to get all available cameras connected to my computer using ActionScript?

+3
source share
3 answers

You can use an array Camera.namesto get a list of supported cameras in the system. Camera.getCamera()returns the default camera link.

Using the Camera.names array, you can call Camera.getCamera(name:String = null)and pass it the name of the camera. To specify a name, use the string representation of the zero-based index position in the Camera.names array. For example, to indicate the third camera in the array, use Camera.getCamera("2").

: flash.media.Camera: Adobe Livedocs

+3

, ActionScript ( Adobe Flash Player).

0
trace(Camera.names);

Don't have a hint of code?

-1
source

Source: https://habr.com/ru/post/1767717/


All Articles