Re: [Flashcoders] CameraDetection Update

2010-06-16 Thread Ktu
btw. I removed all magic values.

Also, Thanks Juan for suggesting my class.

Ktu

On Wed, Jun 16, 2010 at 10:06 AM, Ktu wrote:

> Its unfortunate there was a long break from when you ran across these
> problems. I wonder if the default amount of time to check each camera is not
> long enough.
>
> A stupid thing about camera objects is that when you first try to use it,
> the activity property spikes to 100 for a short period of time, then drops
> down. Maybe some of the cameras you were testing had excessively long spike
> periods and therefore the class did not see it as an acceptable camera.
>
> If you have access to those laptop still, it would be great if you could
> try extending the time it checks each camera. My default time is 1.5sec
> maybe try 3 as an extreme (time to check is determined by a timer.delay and
> timer.repeatCount).
> Example code:
>
> var cd:CameraDetection = new CameraDetection();
> cd.detectionRepeatCount = 30;
> cd.addEventListener (CameraEvent.RESOLVE, onResolve);
> cd.begin();
>
> Unfortunately I don't have access to a lot of different laptops to do
> testing on this class. If anyone else on the list wants to test their camera
> and send me some info that would be fantastic. I know this class has a much
> smaller niche but for the people who could use it this class is
> indispensable.
>
> Thanks Juan,
>
> Ktu;
>
>
> On Wed, Jun 16, 2010 at 9:24 AM, Juan Pablo Califano <
> califa010.flashcod...@gmail.com> wrote:
>
>> Hi Ktu,
>>
>> I told you when you shared your code in this list I'd give you some
>> feedback. I ended up using it a couple of months after that and totally
>> forgot about telling you how it went, so sorry about that.
>>
>> But yes, it worked out great for Macs, which was the problem I was trying
>> to
>> solve.
>>
>> As I mentioned in my answer in SO, the code failed to get the correct
>> camera
>> for some laptops. I tried it in 2 machines, one was a Toshiba, the other
>> one
>> I can't remember for sure, but I think it was an HP. In both cases, it was
>> Windows, one was running XP, the other one was running Vista, IIRC. The
>> cameras were the ones that come built into the computer.
>>
>> I noticed I could detect those cameras fine the "regular way", and since I
>> was in a rush, I just checked if the client was running Mac or not. If
>> Mac,
>> I used your code; if not, just went with the "regular way" (read, calling
>> getCamera naively). I really didn't put much though to it; it just worked
>> in
>> the cases I tested and since the time frame was rather limiting, I left it
>> that way. So that's why I mentioned some other possible cases were it
>> could
>> fail. Not that I found them, but I didn't test thoroughly either.
>>
>> Anyway, thanks for your class, it was very helpful (and I apologize
>> again for not giving you proper feedback at the moment, as I said I would!
>> But better late than never)
>>
>> Cheers
>> Juan Pablo Califano
>>
>> 2010/6/16 Ktu 
>>
>> > Hey List,
>> >
>> > Thanks to Ben and Juan I have made an update to my CameraDetection
>> class.
>> >
>> > ChangeLog:
>> > force settings dialog to open every time unless camera access is already
>> > allowed
>> > implement timer for checking permissions, sometimes the settings dialog
>> > does
>> > not dispatch
>> > some logic updates
>> > cleaner code (only 3 magic values)
>> >
>> > Check it out: link 
>> >
>> > Juan Pablo Califano!
>> > I noticed today that it was your response to a question on
>> > stackoverflow.comthat led Ben to my class. Thank you very much I
>> > greatly appreciate that. I
>> > also noticed that you mentioned my class had some problem with certain
>> > Windows laptops. Can you elaborate about when you said in the post that
>> > you're "not sure if it covers some corner cases?" I would love to know
>> so I
>> > can help make it cover those cases. Thanks
>> >
>> > Ktu;
>> > ___
>> > Flashcoders mailing list
>> > Flashcoders@chattyfig.figleaf.com
>> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>> >
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] CameraDetection Update

2010-06-16 Thread Ktu
Its unfortunate there was a long break from when you ran across these
problems. I wonder if the default amount of time to check each camera is not
long enough.

A stupid thing about camera objects is that when you first try to use it,
the activity property spikes to 100 for a short period of time, then drops
down. Maybe some of the cameras you were testing had excessively long spike
periods and therefore the class did not see it as an acceptable camera.

If you have access to those laptop still, it would be great if you could try
extending the time it checks each camera. My default time is 1.5sec  maybe
try 3 as an extreme (time to check is determined by a timer.delay and
timer.repeatCount).
Example code:

var cd:CameraDetection = new CameraDetection();
cd.detectionRepeatCount = 30;
cd.addEventListener (CameraEvent.RESOLVE, onResolve);
cd.begin();

Unfortunately I don't have access to a lot of different laptops to do
testing on this class. If anyone else on the list wants to test their camera
and send me some info that would be fantastic. I know this class has a much
smaller niche but for the people who could use it this class is
indispensable.

Thanks Juan,

Ktu;

On Wed, Jun 16, 2010 at 9:24 AM, Juan Pablo Califano <
califa010.flashcod...@gmail.com> wrote:

> Hi Ktu,
>
> I told you when you shared your code in this list I'd give you some
> feedback. I ended up using it a couple of months after that and totally
> forgot about telling you how it went, so sorry about that.
>
> But yes, it worked out great for Macs, which was the problem I was trying
> to
> solve.
>
> As I mentioned in my answer in SO, the code failed to get the correct
> camera
> for some laptops. I tried it in 2 machines, one was a Toshiba, the other
> one
> I can't remember for sure, but I think it was an HP. In both cases, it was
> Windows, one was running XP, the other one was running Vista, IIRC. The
> cameras were the ones that come built into the computer.
>
> I noticed I could detect those cameras fine the "regular way", and since I
> was in a rush, I just checked if the client was running Mac or not. If Mac,
> I used your code; if not, just went with the "regular way" (read, calling
> getCamera naively). I really didn't put much though to it; it just worked
> in
> the cases I tested and since the time frame was rather limiting, I left it
> that way. So that's why I mentioned some other possible cases were it could
> fail. Not that I found them, but I didn't test thoroughly either.
>
> Anyway, thanks for your class, it was very helpful (and I apologize
> again for not giving you proper feedback at the moment, as I said I would!
> But better late than never)
>
> Cheers
> Juan Pablo Califano
>
> 2010/6/16 Ktu 
>
> > Hey List,
> >
> > Thanks to Ben and Juan I have made an update to my CameraDetection class.
> >
> > ChangeLog:
> > force settings dialog to open every time unless camera access is already
> > allowed
> > implement timer for checking permissions, sometimes the settings dialog
> > does
> > not dispatch
> > some logic updates
> > cleaner code (only 3 magic values)
> >
> > Check it out: link 
> >
> > Juan Pablo Califano!
> > I noticed today that it was your response to a question on
> > stackoverflow.comthat led Ben to my class. Thank you very much I
> > greatly appreciate that. I
> > also noticed that you mentioned my class had some problem with certain
> > Windows laptops. Can you elaborate about when you said in the post that
> > you're "not sure if it covers some corner cases?" I would love to know so
> I
> > can help make it cover those cases. Thanks
> >
> > Ktu;
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] CameraDetection Update

2010-06-16 Thread Juan Pablo Califano
Hi Ktu,

I told you when you shared your code in this list I'd give you some
feedback. I ended up using it a couple of months after that and totally
forgot about telling you how it went, so sorry about that.

But yes, it worked out great for Macs, which was the problem I was trying to
solve.

As I mentioned in my answer in SO, the code failed to get the correct camera
for some laptops. I tried it in 2 machines, one was a Toshiba, the other one
I can't remember for sure, but I think it was an HP. In both cases, it was
Windows, one was running XP, the other one was running Vista, IIRC. The
cameras were the ones that come built into the computer.

I noticed I could detect those cameras fine the "regular way", and since I
was in a rush, I just checked if the client was running Mac or not. If Mac,
I used your code; if not, just went with the "regular way" (read, calling
getCamera naively). I really didn't put much though to it; it just worked in
the cases I tested and since the time frame was rather limiting, I left it
that way. So that's why I mentioned some other possible cases were it could
fail. Not that I found them, but I didn't test thoroughly either.

Anyway, thanks for your class, it was very helpful (and I apologize
again for not giving you proper feedback at the moment, as I said I would!
But better late than never)

Cheers
Juan Pablo Califano

2010/6/16 Ktu 

> Hey List,
>
> Thanks to Ben and Juan I have made an update to my CameraDetection class.
>
> ChangeLog:
> force settings dialog to open every time unless camera access is already
> allowed
> implement timer for checking permissions, sometimes the settings dialog
> does
> not dispatch
> some logic updates
> cleaner code (only 3 magic values)
>
> Check it out: link 
>
> Juan Pablo Califano!
> I noticed today that it was your response to a question on
> stackoverflow.comthat led Ben to my class. Thank you very much I
> greatly appreciate that. I
> also noticed that you mentioned my class had some problem with certain
> Windows laptops. Can you elaborate about when you said in the post that
> you're "not sure if it covers some corner cases?" I would love to know so I
> can help make it cover those cases. Thanks
>
> Ktu;
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] CameraDetection Update

2010-06-15 Thread Ktu
Hey List,

Thanks to Ben and Juan I have made an update to my CameraDetection class.

ChangeLog:
force settings dialog to open every time unless camera access is already
allowed
implement timer for checking permissions, sometimes the settings dialog does
not dispatch
some logic updates
cleaner code (only 3 magic values)

Check it out: link 

Juan Pablo Califano!
I noticed today that it was your response to a question on
stackoverflow.comthat led Ben to my class. Thank you very much I
greatly appreciate that. I
also noticed that you mentioned my class had some problem with certain
Windows laptops. Can you elaborate about when you said in the post that
you're "not sure if it covers some corner cases?" I would love to know so I
can help make it cover those cases. Thanks

Ktu;
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders