AudioFile
Methods
setAudioFileListener
fun setAudioFileListener(listener: ): Unit
This API is in beta and subject to change.
Registers a listener to be notified about events regarding audio file playing status.
Parameters
listener:
OptionalAudioFileEventsListener or null. Previous listener is removed
Returns
type:
Unit
play
fun play(loop: Boolean
): Unit
This API is in beta and subject to change.
Starts playing an audio file.
Parameters
loop:
Boolean
Whether to loop the audio file
Returns
type:
Unit
stop
fun stop(pause: Boolean
): Unit
This API is in beta and subject to change.
Stops or pauses playing an audio file.
If the file is paused, it is possible to continue to play it by calling AudioFile.play from the position it has been stopped.
Parameters
pause:
Boolean
Whether to pause the audio file
Returns
type:
Unit
release
fun release(): Unit
This API is in beta and subject to change.
Releases all resources allocated for playing audio file.
Must be called even if the file is not played.
Returns
type:
Unit