inspirit / jsfeat

JavaScript Computer Vision library.
MIT License
2.74k stars 372 forks source link

video.videoWidth is still not available in FF when is used - 2 demos are broken #22

Open nlac opened 10 years ago

nlac commented 10 years ago

hi, in the two face detection demos (haar and bbf) the video.videoWidth and video.videoHeight are still 0 when demo_app() tries to use those values.

Working solution:

  1. remove the call of demo_app call from the setTimeout
  2. in the tick(), extend the main condition to this: if (video.readyState === video.HAVE_ENOUGH_DATA && video.videoWidth) and call the demo_app() once immediately after that condition

Your lib is awesome btw!

inspirit commented 10 years ago

hmm thats strange since i tested it in FF on my OSX machine and it works fine for me.

nlac commented 10 years ago

I see, i use win7 pro. In chrome it's ok, but FF produces the issue.

inspirit commented 10 years ago

yeah might be the issue. will add the initiation inside tick method then.

thanx for the head up