Hi! I´m trying to design an experiment and when I put:
Nothing plays. I’ve tried reproducing the tutorial exactly and, while the audio plays when I run the “Try it” within the tutorial, if I copy the exact same text into my experiment (after syncing with the github repository) the audio won´t play. What can it be? Other elements work (for example, graphics and text) just not audio…
Most browsers will block audio/video autoplay on page load, and will require an interaction with the page before the script can trigger playback. If this is the very first trial of your experiment, just add newButton("Start").print().wait(), immediately before newAudio and it should work (also, you probably want to add something after play() because as it is coded now your trial ends as soon as the audio starts playing).