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 docs for the recording_duration parameter say, "You can set this to null to allow the participant to control the length of the recording via the done button", but if set to null the parameter takes on the default of 2000ms. I believe this is because the relevant condition for using the default (line 832 in jsPsych.ts) is: else if (typeof trial[param] === "undefined" || trial[param] === null) {
which results in null being replaced with the default.
I almost put in a PR to just remove the || trial[param] === null, but not sure if other jsPsych code (or experiments) are relying on this behaviour. Perhaps a special value or another boolean parameter would be a better solution.
The text was updated successfully, but these errors were encountered:
Wow, I'm shocked we've never found that bug before. Thanks for bringing it up. We use null values as legal parameter values for many plugins, but I think the difference is that in all other cases the default parameter is also null.
I think a PR is worth trying and we can see if the tests still pass across the board...
The docs for the recording_duration parameter say, "You can set this to null to allow the participant to control the length of the recording via the done button", but if set to null the parameter takes on the default of 2000ms. I believe this is because the relevant condition for using the default (line 832 in jsPsych.ts) is:
else if (typeof trial[param] === "undefined" || trial[param] === null) {
which results in null being replaced with the default.
I almost put in a PR to just remove the
|| trial[param] === null
, but not sure if other jsPsych code (or experiments) are relying on this behaviour. Perhaps a special value or another boolean parameter would be a better solution.The text was updated successfully, but these errors were encountered: