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

experiment hangs when setting use_webaudio: false #1210

Closed
dillonplunkett opened this issue Nov 20, 2020 · 2 comments
Closed

experiment hangs when setting use_webaudio: false #1210

dillonplunkett opened this issue Nov 20, 2020 · 2 comments

Comments

@dillonplunkett
Copy link
Contributor

dillonplunkett commented Nov 20, 2020

jsPsych version 6.1.0
Chrome 87.0.4280.67 on Mac 11.0.1

Setting use_webaudio: false within jsPsych.init, seems to cause experiments hang after the first trial with audio, throwing an exception in the function update_loading_progress_bar().

Should be reproducible with the following (given any test.wav):

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>test</title>
        <script src="jspsych-6.1.0/jspsych.js"></script>
        <link href="jspsych-6.1.0/css/jspsych.css" rel="stylesheet" type="text/css"></link>
    </head>
    <body></body>
    <script src="jspsych-6.1.0/plugins/jspsych-html-button-response.js"></script>
    <script src="jspsych-6.1.0/plugins/jspsych-audio-keyboard-response.js"></script>
    <script>

        let get_click = {
            type: "html-button-response",
            choices: ["Click to start."],
            stimulus: "Click below to start."
        }

        let audio_test = {
            type: "audio-keyboard-response",
            stimulus: "test.wav"
        }

        let exp_timeline = [get_click, audio_test, audio_test];

        jsPsych.init({
            timeline: exp_timeline,
            use_webaudio: false,
        });
    </script>
</html>
@jodeleeuw
Copy link
Member

Hi @dillonplunkett ,

Does the experiment hang, or do you just get the error message in the console? That particular error message is harmless (see #1130), but we have patched it for 6.2 (#648).

There might be a separate unknown-to-us issue going on here that's related to using the same trial twice.

@dillonplunkett
Copy link
Contributor Author

Hi @jodeleeuw,

It looks like it's actually just the error message and this is covered by #648. I thought it was causing the experiment to hang, but I think I was just pausing execution on all exceptions without realizing it. Sorry for the confusion and thanks for your help!

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

2 participants