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

Indefinite recording not working in html-audio-response #3174

Open
alisdt opened this issue Nov 6, 2023 · 2 comments
Open

Indefinite recording not working in html-audio-response #3174

alisdt opened this issue Nov 6, 2023 · 2 comments
Labels
Milestone

Comments

@alisdt
Copy link
Contributor

alisdt commented Nov 6, 2023

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.

@alisdt
Copy link
Contributor Author

alisdt commented Nov 6, 2023

@jodeleeuw
Copy link
Member

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...

@jodeleeuw jodeleeuw added the bug label Dec 14, 2023
@jodeleeuw jodeleeuw added this to the 8.0 milestone Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants