LocalAudioTrack

class LocalAudioTrack(name: String, mediaTrack: AudioTrack) : AudioTrack

Represents a local audio track (generally using the microphone as input).

This class should not be constructed directly, but rather through LocalParticipant.createAudioTrack.

Constructors

Link copied to clipboard
constructor(name: String, mediaTrack: AudioTrack)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val rtcTrack: AudioTrack

The underlying WebRTC audio track.

Link copied to clipboard
var sid: String?
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun dispose()

Disposes the track. LiveKit will generally take care of disposing tracks for you.

Link copied to clipboard
suspend fun getRTCStats(): RTCStatsReport?

Return the RTCStatsReport for this track, or null if none is available.

fun getRTCStats(callback: RTCStatsCollectorCallback)

Calls the callback with the RTCStatsReport for this track, or null if none is available.

Link copied to clipboard
open fun start()

Starts the track.

Link copied to clipboard
open fun stop()

Stops the track.