audio.play
description
Starts playing the audio file.
syntax
getAudio(ELEMENT_NAME).play() alternate(s)
-
getAudio(ELEMENT_NAME).play("loop") -
getAudio(ELEMENT_NAME).play("once")
notes
- If you pass
"loop"as a parameter, the audio will loop forever until the nextstopcommand, or untilplayis called again, this time using the parameter"once". Note that if you useplay("loop"), then stop playback usingstopand useplay()again later (that is, without passing"once"as a parameter) the audio will loop again.
example(s)
@newAudio("test", "test.mp3")
$ .play()
@ .wait()
- Starts playing the file test.mp3 (nothing is added onto the screen).