auduno / headtrackr

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

targets demo does not work in modern browsers (chrome / brave / opera) #54

Open duckfev3r opened 5 years ago

duckfev3r commented 5 years ago

Hi, I'm trying to get the awesome targets demo to run - it's displaying the webGL components fine, but not responding to movement in front of the camera. Would it be possible to get a copy of the sourcecode for the targets demo ?

Thanks !

rbuccigrossi commented 1 year ago

Since I discovered this project today, and discovered this bug, I placed a working version at https://headtrackr.tcg.com/targets.html with the source at https://headtrackr.tcg.com/headtrackr.tar

Mine works for Chrome and Edge but not Firefox (I thought I incorporated the main change in R-Aravind's pull request, but I'm missing something, so I'll have to try again later).

rbuccigrossi commented 1 year ago

It looks like we need another pull request! Safari on iOS uses the modern navigator.mediaDevices.getUserMedia interface that uses promises. Once I updated the headtrackr "init" function to use the newer interface it worked on the latest Chrome, Edge, Firefox and iOS Safari. I updated my demo at https://headtrackr.tcg.com/