【发布时间】:2013-01-07 06:38:17
【问题描述】:
嗨朋友们,我已经使用 flash as3 创建了一个用于 web 应用程序的相机应用程序。它工作正常,并使用 Camera.getCamera(); 的相机类;现在我想为 android 创建同样的应用程序。我只有带有前置摄像头的安卓设备。所以我在我的设备中运行了同一个应用程序。我看不到相机显示。我可以使用任何选项来访问设备上的前置摄像头吗?
【问题讨论】:
标签: actionscript-3 flash camera
嗨朋友们,我已经使用 flash as3 创建了一个用于 web 应用程序的相机应用程序。它工作正常,并使用 Camera.getCamera(); 的相机类;现在我想为 android 创建同样的应用程序。我只有带有前置摄像头的安卓设备。所以我在我的设备中运行了同一个应用程序。我看不到相机显示。我可以使用任何选项来访问设备上的前置摄像头吗?
【问题讨论】:
标签: actionscript-3 flash camera
使用documentation! Camera.getCamera() 的描述说明:
Parameters
name:String (default = null) — Specifies which camera to get, as determined from the array returned by the names property. For most applications, get the default camera by omitting this parameter. To specify a value for this parameter, 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").
因此,如果您想要第二个摄像头,请使用
Camera.getCamera("1")
【讨论】:
摄像头索引是定义后置摄像头或前置摄像头的数字。第一个索引可能是后置摄像头,第二个索引可能是前置摄像头,反之亦然。
如果我猜的话,我会说你使用Camera class..post on this Blog gives you a more information
希望这对你有帮助..!
【讨论】: