PennController for IBEX › Forums › Support › Audio playing twice
- This topic has 4 replies, 2 voices, and was last updated 4 weeks, 1 day ago by stradee.
April 27, 2023 at 12:43 am #10484
In my current script, especially in ‘practice’ session, I made participants click the play button only once, and then audio bar disappears.
I want them to click the play button up to twice if they want to listen more.
How can I modify my script?
Here is my link >>
Thanks!April 27, 2023 at 3:47 am #10486JeremyKeymaster
waitcommand on the Audio element, instead of removing it immediately, tell the script to wait a second time before removing it. Now, you don’t want that second
waitto block the rest of the script (ie. you want the TextInput element to appear immediately after the first playback, even if the audio isn’t played back a second time) so you need to run those instructions in parallel, in the
callbackcommand of a Timer element for example:
newAudio("audio", row.audio) .center() .print() .wait() , newTimer(10).callback( getAudio("audio").wait().remove() ).start()
JeremyApril 29, 2023 at 3:18 am #10493
I modified the script as you mentioned, but it didn’t work well as I expected.
I want participants to listen to the target audio file once or twice (as they want to listen one more)
So, after they listen twice, the audio play bar must disappear so that they cannot listen any more.
How can I modify the script?
Thanks for your help!
Template( “practice2.csv” , row =>
);April 29, 2023 at 3:43 am #10494JeremyKeymaster
You’re missing the parentheses
JeremyApril 30, 2023 at 2:09 am #10495
Jeremy, it works well!! I didn’t notice just a simple mistake.
Really thank you!!
- You must be logged in to reply to this topic.