pause

abstract fun pause()

When overridden, used when Audio is AudioState.PLAYING to pause the sound to be continued later.

Sets the audioState to AudioState.PAUSED

Example:

val audio = Audio(audioUrl) // AutoPlay defaults to "false"
audio.play() // plays the sound immediately
// more code
audio.pause() // paused until play is called again
// more code
audio.play() // sound resumes