RemoteAudioTrack

class RemoteAudioTrack @AssistedInject constructor(@Assisted name: String, @Assisted val rtcTrack: AudioTrack, @Assisted receiver: RtpReceiver, val rtcThreadToken: RTCThreadToken) : AudioTrack

A representation of a remote audio track.

Constructors

Link copied to clipboard
@AssistedInject
constructor(@Assisted name: String, @Assisted rtcTrack: AudioTrack, @Assisted receiver: RtpReceiver, rtcThreadToken: RTCThreadToken)

Types

Link copied to clipboard
@AssistedFactory
interface Factory

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val rtcThreadToken: RTCThreadToken
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 override fun addSink(sink: AudioTrackSink)

Adds a sink that receives the audio bytes and related information for this audio track. Repeated calls using the same sink will only add the sink once.

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 override fun removeSink(sink: AudioTrackSink)

Removes a previously added sink.

Link copied to clipboard
fun setVolume(volume: Double)

Sets the volume.

Link copied to clipboard
open fun start()

Starts the track.

Link copied to clipboard
open fun stop()

Stops the track.