Rate this page:

AudioFile

Methods

setAudioFileListener

Copy URL
fun setAudioFileListener(listener: 

AudioFileEventsListener?

):

Unit

This API is in beta and subject to change.

Registers a listener to be notified about events regarding audio file playing status.

Parameters

Returns

  • type:

    Unit

play

Copy URL
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

Copy URL
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

Copy URL
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