RemoteDataTrack

A data track published by a remote participant.

Call subscribe to start receiving frames.

remoteTrack.subscribe().onSuccess { stream ->
stream.flow.collect { frame -> process(frame.payload) }
}

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Metadata for this track.

Link copied to clipboard

Whether the track is currently published by the remote participant.

Link copied to clipboard

Name chosen by the publisher; unique per participant.

Link copied to clipboard

Identity of the participant publishing this track.

Functions

Link copied to clipboard
suspend fun subscribe(@IntRange(from = 1) bufferSize: Int = DEFAULT_BUFFER_SIZE): Result<DataTrackStream>

Subscribes to the track and returns a DataTrackStream of incoming frames.

Link copied to clipboard
suspend fun waitForUnpublish()

Waits until the track is unpublished, by either the publisher or the SFU.