i made a desktop air-app. the problem is when i unpluged my usb camera and start the air app . the app detect the existed cameras with Camera.names.length = 2; and then i pluged another usb camera and use the Camera.names.length to detect the new camera, but the result is still 2 , not the 2 existed camera with the new added one which the total is 3. then i close the air-app and start it again ,this time the camera.names.length is 3. why ? the air-app just cannot detect the new added camera? the only way the air-app can detect the new added camera is restart the app?
Air ow flash player for that matter won't detect camera added at runtime. It will detect if you remove the camera while you were capturing images from the camera. You can try to scan for camera suing a timer and see if it detects it then.
There is also a not so documented flash.media.scanHardware() method, which should force a hardware scan. I did not used it yet so can't vouch for it.
just using the function flash.media.scanHardware() is OK.