Closed hanadi92 closed 3 years ago
I ended up using await
on setting the deviceId living in webgazer.params.camConstraints.video
before firing the begin()
and it works.
However, there exist a function called setCameraConstraints
, which is documented in the API docs which is no where called and I assume it's a deprecated function because the default used tracker facemesh has no reset function implemented. Which was misleading for me.
I want to use the built Webgazer.js without making any changes in the src. Therefore, I am looking for a way to set a param that would take the camera deviceId that I set in a cookie before the webgazer is loaded. I tried to set:
webgazer.params.camConstraints.video.deviceId = "";
and I don't know why but it's not taken in thebegin()
function. Is this possible? or do I have to tweak the sources?