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

setAutoDraw(false) skipped when video shorter than duration given in PsychoPy #3183

Closed
thewhodidthis opened this issue Oct 1, 2020 · 1 comment
Assignees
Milestone

Comments

@thewhodidthis
Copy link
Contributor

This happens because when a MovieStim is done playing its status turns to PsychoJS.Status.FINISHED, but the check that is generated in place is expecting a status of PsychoJS.Status.STARTED:

if (movie.status === PsychoJS.Status.STARTED && t >= frameRemains) {
  movie.setAutoDraw(false);
}

I believe having a check along the following lines might help:

if ((movie.status === PsychoJS.Status.STARTED || movie.status === PsychoJS.Status.FINISHED) && t >= frameRemains) {
  movie.setAutoDraw(false);
}
@peircej
Copy link
Member

peircej commented Oct 1, 2020

interesting. Yes, that makes sense I guess, but it sounds strange said out loud! ;-)

@peircej peircej added this to the 2020.2.5 milestone Oct 2, 2020
@peircej peircej closed this as completed in c818305 Oct 2, 2020
peircej added a commit that referenced this issue Oct 2, 2020
peircej added a commit that referenced this issue Oct 22, 2020
This might be useful in some clean-ups, e.g. to reset a video

Fix first noted in #3183
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

No branches or pull requests

3 participants