Skip to content
Discussion options

You must be logged in to vote

Hi,

  1. define a variable:
    var audio_files = [
    "silence.wav",
    "noise.wav",
    ];

  2. preload files:
    jsPsych.init({
    timeline: timeVar,
    use_webaudio: false,
    preload_audio: audio_files,
    on_close: function() {...
    ...
    });

if this doesn't work, you can add a dummy trial at the very beginning of the timeline that requires user interaction (I use html-button-response). On the console, it may still give this error but will play audios.

This question was asked and answered many times in the discussion threads, you can type 'audio' in the search button to see other solutions.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jodeleeuw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #662 on June 11, 2020 15:33.