AudioTrack

The AudioTrack class manages and plays a single audio resource.

Properties

Link copied to clipboard
val kind: TrackType

Returns the type of the track, indicating whether it is an audio track or a video track.

Link copied to clipboard
var name: String?

Retrieves the name associated with the track.

Functions

Link copied to clipboard
open override fun setEnabled(enable: Boolean)

Controls whether the audio track's sound is enabled. When set to true, the track is active and will render incoming audio data. Setting it to false results in producing silence.

Link copied to clipboard
fun setVolume(volume: Double)

Adjusts the playback volume for the remote audio track to provide dynamic control over the audio output level.