Open auduno opened 11 years ago
May you provide a jsFiddle? I couldn't reproduce that error.
This is happening to me as well (trying to use headtrackr in the main Controller of an AngularJS App), but i can't find the cause of the problem...if it helps they were talking about the same error here as well: http://auduno.tumblr.com/post/25125149521/head-tracking-with-webrtc
UPDATE: i just realized that the tumbler it's from @auduno :) Any updates on this? (i'm not using htracker.stop())
I haven't really had time to look at it, unfortunately. Do you have the possibility to create an example of the bug in a dropbox or jsfiddle page?
Well i actually solved MY problem (which was something quite stupid).
To explain it, to those who might get the same problem:
Inside
document.addEventListener("facetrackingEvent", function( event ) {
i was doing:
overlayContext.drawImage(stickImage,some,other,stuf,etc);
Where stickImage
didn't actually contain an image.
I'm sure that is not a bug of headtrackr tho.
Haha, great to hear it's not my fault :)
Sorry, if it's not a good place to ask, but is there way to stop getUserMedia
at all from headtrackr?
If you mean stopping webcam stream, no. headtrackr.stop() merely stops the tracking, not the video. The correct way to stop a getusermedia stream is to call stop() on the mediastream, but I guess you also can call stop() or pause() on the video element.
@auduno, thanks for quick response. As I see, mediastream is placed deep into headtrackr.js, can I get mediastream outside headtrackr.js src to stop it? Sorry for this type of questions, headtrackr.js is too complicated for me, haven't success with it for several days.
Hmm, it seems I should have added functionality for this. As far as I can tell, it's not possible to stop the mediastream without the mediastream object, which I discard after I set it up. I'll try to add functionality for that within the next couple of days.
@auduno oh, thanks, it would be great! Should I create new issue for this? If you give me a tips, what need to do, I can try to male a pr
I created a new issue for it now here : https://github.com/auduno/headtrackr/issues/24
cool, thanks
when calling stop() on a headtracker instance from an eventlistener, an InvalidStateError is raised in Chrome:
Uncaught InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable.