LocalParticipant

class LocalParticipant : Participant

Types

Factory
Link copied to clipboard
@AssistedFactory()
interface Factory
PublishListener
Link copied to clipboard
interface PublishListener

Functions

cleanup
Link copied to clipboard
fun cleanup()
createAudioTrack
Link copied to clipboard
fun createAudioTrack(name: String = "", options: LocalAudioTrackOptions = audioTrackCaptureDefaults): LocalAudioTrack
Creates an audio track, recording audio through the microphone with the given options.
createScreencastTrack
Link copied to clipboard
fun createScreencastTrack(name: String = "", mediaProjectionPermissionResultData: Intent, options: LocalVideoTrackOptions = videoTrackCaptureDefaults.copy(), videoProcessor: VideoProcessor? = null): LocalScreencastVideoTrack
Creates a screencast video track.
createVideoTrack
Link copied to clipboard
fun createVideoTrack(name: String = "", options: LocalVideoTrackOptions = videoTrackCaptureDefaults.copy(), videoProcessor: VideoProcessor? = null): LocalVideoTrack
Creates a video track, recording video through the camera with the given options.
fun createVideoTrack(name: String = "", capturer: VideoCapturer, options: LocalVideoTrackOptions = videoTrackCaptureDefaults.copy(), videoProcessor: VideoProcessor? = null): LocalVideoTrack
Creates a video track, recording video through the supplied capturer.
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
getTrackPublication
Link copied to clipboard
open override fun getTrackPublication(source: Track.Source): LocalTrackPublication?
Retrieves the first track that matches the source, or null
getTrackPublicationByName
Link copied to clipboard
open override fun getTrackPublicationByName(name: String): LocalTrackPublication?
Retrieves the first track that matches name, or null
hashCode
Link copied to clipboard
open override fun hashCode(): Int
isCameraEnabled
Link copied to clipboard
fun isCameraEnabled(): Boolean
isMicrophoneEnabled
Link copied to clipboard
fun isMicrophoneEnabled(): Boolean
isScreenShareEnabled
Link copied to clipboard
fun isScreenShareEnabled(): Boolean
prepareForFullReconnect
Link copied to clipboard
fun prepareForFullReconnect()
publishAudioTrack
Link copied to clipboard
suspend fun publishAudioTrack(track: LocalAudioTrack, options: AudioTrackPublishOptions = AudioTrackPublishOptions( null, audioTrackPublishDefaults, ), publishListener: LocalParticipant.PublishListener? = null)
publishData
Link copied to clipboard
suspend fun publishData(data: ByteArray, reliability: DataPublishReliability = DataPublishReliability.RELIABLE, topic: String? = null, identities: List<Participant.Identity>? = null)
Publish a new data payload to the room.
publishVideoTrack
Link copied to clipboard
suspend fun publishVideoTrack(track: LocalVideoTrack, options: VideoTrackPublishOptions = VideoTrackPublishOptions(null, videoTrackPublishDefaults), publishListener: LocalParticipant.PublishListener? = null)
republishTracks
Link copied to clipboard
suspend fun republishTracks()
setCameraEnabled
Link copied to clipboard
suspend fun setCameraEnabled(enabled: Boolean)
setMicrophoneEnabled
Link copied to clipboard
suspend fun setMicrophoneEnabled(enabled: Boolean)
setScreenShareEnabled
Link copied to clipboard
suspend fun setScreenShareEnabled(enabled: Boolean, mediaProjectionPermissionResultData: Intent? = null)
setTrackSubscriptionPermissions
Link copied to clipboard
fun setTrackSubscriptionPermissions(allParticipantsAllowed: Boolean, participantTrackPermissions: List<ParticipantTrackPermission> = emptyList())
Control who can subscribe to LocalParticipant's published tracks.
unpublishTrack
Link copied to clipboard
fun unpublishTrack(track: Track, stopOnUnpublish: Boolean = true)
updateMetadata
Link copied to clipboard
fun updateMetadata(metadata: String)
Updates the metadata of the local participant.
updateName
Link copied to clipboard
fun updateName(name: String)
Updates the name of the local participant.

Properties

audioLevel
Link copied to clipboard
@FlowObservable()
var audioLevel: Float
Changes can be observed by using io.livekit.android.util.flow
audioTrackCaptureDefaults
Link copied to clipboard
var audioTrackCaptureDefaults: LocalAudioTrackOptions
audioTrackPublications
Link copied to clipboard
@FlowObservable()
val audioTrackPublications: <ERROR CLASS>
Changes can be observed by using io.livekit.android.util.flow
audioTrackPublishDefaults
Link copied to clipboard
connectionQuality
Link copied to clipboard
@FlowObservable()
var connectionQuality: ConnectionQuality
Changes can be observed by using io.livekit.android.util.flow
events
Link copied to clipboard
val events: EventListenable<ParticipantEvent>
hasInfo
Link copied to clipboard
val hasInfo: Boolean
identity
Link copied to clipboard
@FlowObservable()
var identity: Participant.Identity?
Changes can be observed by using io.livekit.android.util.flow
isSpeaking
Link copied to clipboard
@FlowObservable()
var isSpeaking: Boolean
Changes can be observed by using io.livekit.android.util.flow
joinedAt
Link copied to clipboard
val joinedAt: <ERROR CLASS>
Timestamp when participant joined room, in milliseconds
lastSpokeAt
Link copied to clipboard
@FlowObservable()
var lastSpokeAt: Long?
Timestamp when the participant last started speaking, in milliseconds
metadata
Link copied to clipboard
@FlowObservable()
var metadata: String?
Changes can be observed by using io.livekit.android.util.flow
name
Link copied to clipboard
@FlowObservable()
var name: String?
participantInfo
Link copied to clipboard
@FlowObservable()
var participantInfo: <ERROR CLASS>?
Changes can be observed by using io.livekit.android.util.flow
permissions
Link copied to clipboard
@FlowObservable()
var permissions: ParticipantPermission?
sid
Link copied to clipboard
var sid: Participant.Sid
trackPublications
Link copied to clipboard
@FlowObservable()
var trackPublications: <ERROR CLASS>
Maps track sids to their track publications.
videoTrackCaptureDefaults
Link copied to clipboard
var videoTrackCaptureDefaults: LocalVideoTrackOptions
videoTrackPublications
Link copied to clipboard
@FlowObservable()
val videoTrackPublications: <ERROR CLASS>
Changes can be observed by using io.livekit.android.util.flow
videoTrackPublishDefaults
Link copied to clipboard

Sources

SDK source
Link copied to clipboard