rememberTracks

fun rememberTracks(sources: List<Track.Source> = listOf( Track.Source.CAMERA, Track.Source.SCREEN_SHARE ), usePlaceholders: Set<Track.Source> = emptySet(), passedRoom: Room? = null, onlySubscribed: Boolean = true): List<TrackReference>

Returns an array of TrackReferences depending the sources provided.

Parameters

sources

The sources of the tracks to provide. Defaults to camera and screen share tracks.

usePlaceholders

A set of sources to provide placeholders for. A placeholder will provide a TrackReference for participants that don't yet have a track published for that source. Defaults to no placeholders.

passedRoom

The room to use on, or RoomLocal if null/not passed.

onlySubscribed

If true, only return tracks that have been subscribed. Defaults to true.