Skip to content

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

@thewhodidthis

Description

@thewhodidthis

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);
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions