Skip to content
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

Add stop feature #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add stop feature #21

wants to merge 1 commit into from

Conversation

defvol
Copy link
Owner

@defvol defvol commented Mar 9, 2014

WIP

@defvol defvol mentioned this pull request Mar 9, 2014
@Dayjo
Copy link

Dayjo commented Mar 11, 2014

I have been trying to test stopping and starting. Stopping seems to work fine, however restarting doesn't.

I'm doing the following;

paparazzo.on "update", (image) =>
    updatedImage = image
    count++
    console.log count
    if count is 10
      paparazzo.stop()
      setTimeout paparazzo.start, 2000

and receive the following error when the start function runs;

http.js:1839
  if (options.protocol && options.protocol !== 'http:') {
             ^
TypeError: Cannot read property 'protocol' of undefined
    at Object.exports.request (http.js:1839:14)
    at Object.exports.get (http.js:1847:21)
    at Paparazzo.start [as _onTimeout] (/paparazzo/src/paparazzo.coffee:36:27)
    at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)

Neither @options or emitter are working in the scope when the function is run for a second time

@ returns the following in the paparazzo start function;
{ _idleTimeout: 2000, _idlePrev: null, _idleNext: null, _idleStart: 1394498719169, _onTimeout: [Function], _repeat: false }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants