-
Notifications
You must be signed in to change notification settings - Fork 502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
htracker.stop() does not work from an eventlistener #16
Comments
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 :) |
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 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 |
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? |
I created a new issue for it now here : #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.
The text was updated successfully, but these errors were encountered: