auduno / headtrackr

Javascript library for headtracking via webcam and WebRTC/getUserMedia
3.69k stars 504 forks source link

Firefox 18 support #7

Closed mkirank closed 11 years ago

mkirank commented 11 years ago

The new version's of firefox ( 18 ) have webrtc support , It looks like headtrackr does not support that .

auduno commented 11 years ago

Yes, there are some differences in how Firefox handles webrtc. I'll have a look at it and implement a fix during this week. Thanks for the tip!

jkolivas commented 11 years ago

I'm far from an expert, but I was running into an issue In Firefox 21 where the canvasContext.drawImage in headtrackr.starter was failing because the component wasn't available on the first (and sometimes second) iteration. The workaround was simply to wrap that call in a try/catch.

Probably not ideal, but it works perfectly now.

auduno commented 11 years ago

Firefox support is now added in the dev branch. I'll merge it into master soon.

Note that I haven't found a way to check whether getUserMedia is enabled or not, firefox returns a mozGetUserMedia function even if it's disabled. Firefox also seems to not throw an error if it doesn't find a camera, so it currently fails silently.

@jkolivas: the error you describe seems to be a race condition that might not be related to firefox. I'll have a look at fixing that.

auduno commented 11 years ago

Firefox support is now added to master. There seem to be some issues with Firefox 18, it was running at a very poor framerate, and I couldn't figure out why. It's running smoothly in Firefox 21, though, so it might be some issues with Firefox 18.

@jkolivas I fixed the bug you mentioned with the suggested try-catch fix. Thanks for the tip!