You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The most recent versions of PsychoPy use the MovieStim.isFinished property to report whether a movie has finished playback. PsychoJS uses PsychoJS.Status.FINISHED. The FINISHED status was removed from Python in favor of the isFinished property, but no corresponding property was added to PsychoJS.
You can work around it with a bit of effort, but even in a code component you can't use auto->js because you have to use the isFinished property in Python and the FINISHED status in PsychoJS.
Purpose
Prior to the MoveStim rewrite and use of ffpyplayer library, both PsychoJS and PsychoPy used a "FINISHED" status, so it was possible to use auto->js code translation or a condition to start a component (e.g., show a response only after a movie finishes playing within a single trial) that would work both locally and online.
Is your feature request related to a problem?
Just that you end up creating experiments that work either locally or online but not both without a very careful workaround, and it's unintuitive and bad for standardization. It's also not well-documented, since the MovieStim API page just references isFinished.
Describe the solution you would like
I can think of three fixes, not sure what would be easiest:
Add an isFinished property to MovieStim in PsychoJS
Add a redundant "FINISHED" status back in to PsychoPy's MovieStim
Change auto->js to interpret ".isFinished" as "=== PsychoJS.Status.FINISHED" (not ideal because it doesn't necessarily work as a condition for a component)
Describe alternatives that you have considered
N/A
Additional context
No response
The text was updated successfully, but these errors were encountered:
We added .isFinished to the Python class so that we could distinguish between a movie that had reached its end versus one that had been told by Builder to finish. Basically the class needs to have a record of how the file-reading is going that's independent of how the experiment is running. BUT the aim was for the movie.status also to be updated on every frame so that checks on movie.status==FINISHED would still work
Description
The most recent versions of PsychoPy use the MovieStim.isFinished property to report whether a movie has finished playback. PsychoJS uses PsychoJS.Status.FINISHED. The FINISHED status was removed from Python in favor of the isFinished property, but no corresponding property was added to PsychoJS.
You can work around it with a bit of effort, but even in a code component you can't use auto->js because you have to use the isFinished property in Python and the FINISHED status in PsychoJS.
Purpose
Prior to the MoveStim rewrite and use of ffpyplayer library, both PsychoJS and PsychoPy used a "FINISHED" status, so it was possible to use auto->js code translation or a condition to start a component (e.g., show a response only after a movie finishes playing within a single trial) that would work both locally and online.
Is your feature request related to a problem?
Just that you end up creating experiments that work either locally or online but not both without a very careful workaround, and it's unintuitive and bad for standardization. It's also not well-documented, since the MovieStim API page just references isFinished.
Describe the solution you would like
I can think of three fixes, not sure what would be easiest:
Describe alternatives that you have considered
N/A
Additional context
No response
The text was updated successfully, but these errors were encountered: