Class Audio
The helper for playing audio.
Constructor Attributes | Constructor Name and Description |
---|---|
Audio(filePath, autoPlay, loop)
Constructor.
|
Method Attributes | Method Name and Description |
---|---|
isLoaded()
Returns true if audio file has been loaded.
|
|
Returns true if audio file is playing.
|
|
play()
Starts playing the audio.
|
|
stop()
Stops playing the audio.
|
Class Detail
Audio(filePath, autoPlay, loop)
Constructor.
- Parameters:
- filePath
- The audio path to play.
- autoPlay
- Whether auto play the audio when loaded.
- loop
- Whether loop the audio or not.
Method Detail
isLoaded()
Returns true if audio file has been loaded.
isPlaying()
Returns true if audio file is playing.
play()
Starts playing the audio.
stop()
Stops playing the audio.