AudioAsset

class AudioAsset(handle: AudioHandle, worker: RiveWorker) : Asset<AudioHandle>

An audio asset, representing a playable sound, managed by a RiveWorker.

Parameters

handle

The handle to the audio on the command server.

worker

The Rive worker that owns the audio.

Constructors

Link copied to clipboard
constructor(handle: AudioHandle, worker: RiveWorker)

Types

Link copied to clipboard
object Companion : AssetOps<AudioHandle, AudioAsset>

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
fun register(key: String)

Register the asset with the given key. When Rive fulfills a referenced asset, it will look for an asset registered under that key. The key comes from the zip file created when exporting a Rive file.

Link copied to clipboard
fun unregister(key: String)

Unregister the asset with the given key.