PennController for IBEX › Forums › Support › re-play audio file › Reply To: re-play audio file
November 22, 2019 at 6:28 pm
#4343
Keymaster
Thanks Umesh!
I guess you found this topic using the search form, since it was lacking a parent forums (it was imported from the old website)—I have just fixed that
To expand on your answer, it’s better not to prefix getAudio with this (as this can have different meanings in different environments) and to make sure to replace audioName with the string you used to name your audio file. Here’s an illustration including an Audio element:
newAudio("myAudio", "test.mp3")
.play()
.wait()
,
newButton("Replay")
.settings.callback( getAudio("myAudio").play() )
.print()