-
Notifications
You must be signed in to change notification settings - Fork 6
Home
Hello, big update here.
MediaPermissions allows you easy access to getting permission to use the Camera (or Mic)
CameraDetection allows you to get permission, and then find a good Camera
i have put a lot of effort into getting all aspects of this flawless, but unless adobe changes some things, there will always be the potential that my code does not work.
If you try to access a Camera when it is already in use, flash will give you a valid instance and think it is fine, but in reality, will not produce an image. therefore, in order to truly know if a Camera is working, you must listen to its fps and activity values until there is a response. this is where the problem comes in, different hardware will take different lengths of time to respond, so how long does the code look at one Camera before giving up and moving on? precisely.
in my development i seemed ok making it check a camera for 2-2.5 seconds. however, while taxing my machine (with a visualizer) i needed 3-3.5 seconds to always guarantee a proper response.
er on the the lowest common denominator and put up some fun dialog that says 'detecting camera'. it does slow the user experience but if the camera doesn't work then you know! and you can make better suggestions to the user (ex: i see you have a camera but it is not responding, make sure it is not being used already and that it is fully connected and try again!)
simple! in the repository there is a class called CameraDetectionLogger. this class captures all the information during the process of detecting camera and stores it in a member called log. once i get it fully setup you can log it to my endpoint (or update your source to include the auto update i will do later). then we can gather datas about cameras in flash and maybe have some fodder for adobe.
also! i am welcome to any updates tips or suggestions for improvements, make an 'issue' above
ktu