It seems that Camera class does not work properly in AIR. Flex Builder does not even provide drop down "addEventListener" for a camera object.
The same code works well in flash versions.
var camera:Camera = Camera.getCamera(); liteSpyModelLocator.streamFileName = "red5"; liteSpyModelLocator.spyStream = new NetStream(liteSpyModelLocator.spyConnection); liteSpyModelLocator.spyStream.addEventListener(NetStatusEvent.NET_STATUS, onStatus,false,0,true); liteSpyModelLocator.spyStream.attachCamera(camera); liteSpyModelLocator.spyStream.publish(liteSpyModelLocator.streamFileName,"live")
Its seems to be all black when i try to read the stream. Also Camera.get(); gives null on passing a parameter , like:
Camera.get(Camera.names); -> null
there is no addeventListener in drop down in any version of flexbuilder for camera class.
is this a bug ? or a missing feature ?
Please help !
Ok here is the actual problem that i got. I had selected a different camera source earlier in the flash player settings dialog.
now in air i seem to get that as default , when i do Camera.getCamera();
And as per docs, Settings dialog box does not pop in AIR. So can i change the default selected camera from air ?