开发者

How to get all available cameras with actionscript?

开发者 https://www.devze.com 2023-01-18 18:15 出处:网络
I can get the default camera this way: Camera.getCamera(); But how to get all available cameras connected t开发者_如何学Co my computer with actionscript?You can use the Camera.names array to get th

I can get the default camera this way:

Camera.getCamera();

But how to get all available cameras connected t开发者_如何学Co my computer with actionscript?


You can use the Camera.names array to get the list of cameras supported on the system. Camera.getCamera() returns a reference to the default camera.

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

More info : flash.media.Camera : Adobe Livedocs


Unfortunately only the selected camera (via Adobe Flash Player Settings) is available to ActionScript.


trace(Camera.names);

Don't you have code hinting?

0

精彩评论

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

关注公众号