-
public final class RemoteParticipant extends Participant
A representation of a remote participant.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceRemoteParticipant.Factory
-
Field Summary
Fields Modifier and Type Field Description private final EventListenable<ParticipantEvent>eventsprivate LivekitModels.ParticipantInfoparticipantInfoprivate Participant.Identityidentityprivate Participant.Statestateprivate FloataudioLevelprivate BooleanisSpeakingprivate Stringnameprivate Stringmetadataprivate Map<String, String>attributesprivate AgentAttributesagentAttributesprivate ParticipantPermissionpermissionsprivate ConnectionQualityconnectionQualityprivate final LongjoinedAtprivate LonglastSpokeAtprivate Participant.Kindkindprivate final BooleanhasInfoprivate <ERROR CLASS>trackPublicationsprivate final <ERROR CLASS>audioTrackPublicationsprivate final <ERROR CLASS>videoTrackPublicationsprivate final <ERROR CLASS>isMicrophoneEnabledprivate final <ERROR CLASS>isCameraEnabledprivate final <ERROR CLASS>isScreenShareEnabledprivate Participant.Sidsid
-
Constructor Summary
Constructors Constructor Description RemoteParticipant(Participant.Sid sid, Participant.Identity identity, SignalClient signalClient, CoroutineDispatcher ioDispatcher, CoroutineDispatcher defaultDispatcher, RemoteAudioTrack.Factory audioTrackFactory, RemoteVideoTrack.Factory videoTrackFactory)
-
Method Summary
Modifier and Type Method Description final EventListenable<ParticipantEvent>getEvents()final LivekitModels.ParticipantInfogetParticipantInfo()Changes can be observed by using io.livekit.android.util.flow final UnitsetParticipantInfo(@FlowObservable() LivekitModels.ParticipantInfo participantInfo)final Participant.IdentitygetIdentity()The participant's identity on the server. final UnitsetIdentity(@FlowObservable() Participant.Identity identity)final Participant.StategetState()The participant state. final UnitsetState(@FlowObservable() Participant.State state)final FloatgetAudioLevel()Changes can be observed by using io.livekit.android.util.flow final UnitsetAudioLevel(@FlowObservable() Float audioLevel)final BooleangetIsSpeaking()Changes can be observed by using io.livekit.android.util.flowA ParticipantEvent.SpeakingChanged event is emitted from events whenever this changes. final UnitsetIsSpeaking(@FlowObservable() Boolean isSpeaking)final StringgetName()The participant's name. final UnitsetName(@FlowObservable() String name)final StringgetMetadata()The metadata for this participant. final UnitsetMetadata(@FlowObservable() String metadata)final Map<String, String>getAttributes()The attributes set on this participant. final UnitsetAttributes(@FlowObservable() Map<String, String> attributes)final AgentAttributesgetAgentAttributes()The agent attributes for this participant. final UnitsetAgentAttributes(@FlowObservable() AgentAttributes agentAttributes)The agent attributes for this participant. final ParticipantPermissiongetPermissions()The permissions for this participant. final UnitsetPermissions(@FlowObservable() ParticipantPermission permissions)final ConnectionQualitygetConnectionQuality()Changes can be observed by using io.livekit.android.util.flow final UnitsetConnectionQuality(@FlowObservable() ConnectionQuality connectionQuality)final LonggetJoinedAt()final LonggetLastSpokeAt()Timestamp when the participant last started speaking, in milliseconds final UnitsetLastSpokeAt(@FlowObservable() Long lastSpokeAt)final Participant.KindgetKind()The kind of participant (i.e. final UnitsetKind(@FlowObservable() Participant.Kind kind)final BooleangetHasInfo()final <ERROR CLASS>getTrackPublications()Maps track sids to their track publications. final Unit)>setTrackPublications(@FlowObservable() <ERROR CLASS> trackPublications)final <ERROR CLASS>getAudioTrackPublications()Changes can be observed by using io.livekit.android.util.flow final <ERROR CLASS>getVideoTrackPublications()Changes can be observed by using io.livekit.android.util.flow final <ERROR CLASS>getIsMicrophoneEnabled()final <ERROR CLASS>getIsCameraEnabled()final <ERROR CLASS>getIsScreenShareEnabled()final Participant.SidgetSid()final UnitsetSid(Participant.Sid sid)final RemoteTrackPublicationgetTrackPublication(String sid)Get a track publication with the corresponding sid. final UnitunpublishTrack(String trackSid, Boolean sendUnpublish)-
-
Constructor Detail
-
RemoteParticipant
RemoteParticipant(Participant.Sid sid, Participant.Identity identity, SignalClient signalClient, CoroutineDispatcher ioDispatcher, CoroutineDispatcher defaultDispatcher, RemoteAudioTrack.Factory audioTrackFactory, RemoteVideoTrack.Factory videoTrackFactory)
-
-
Method Detail
-
getEvents
final EventListenable<ParticipantEvent> getEvents()
-
getParticipantInfo
@FlowObservable() final LivekitModels.ParticipantInfo getParticipantInfo()
Changes can be observed by using io.livekit.android.util.flow
-
setParticipantInfo
final Unit setParticipantInfo(@FlowObservable() LivekitModels.ParticipantInfo participantInfo)
-
getIdentity
@FlowObservable() final Participant.Identity getIdentity()
The participant's identity on the server. name should be preferred for UI usecases.
Changes can be observed by using io.livekit.android.util.flow
-
setIdentity
@VisibleForTesting() final Unit setIdentity(@FlowObservable() Participant.Identity identity)
-
getState
@FlowObservable() final Participant.State getState()
The participant state.
Changes can be observed by using io.livekit.android.util.flow
-
setState
@VisibleForTesting() final Unit setState(@FlowObservable() Participant.State state)
-
getAudioLevel
@FlowObservable() final Float getAudioLevel()
Changes can be observed by using io.livekit.android.util.flow
-
setAudioLevel
@VisibleForTesting() final Unit setAudioLevel(@FlowObservable() Float audioLevel)
-
getIsSpeaking
@FlowObservable() final Boolean getIsSpeaking()
Changes can be observed by using io.livekit.android.util.flow
A ParticipantEvent.SpeakingChanged event is emitted from events whenever this changes.
-
setIsSpeaking
@VisibleForTesting() final Unit setIsSpeaking(@FlowObservable() Boolean isSpeaking)
-
getName
@FlowObservable() final String getName()
The participant's name. To be used for user-facing purposes (i.e. when displayed in the UI).
Changes can be observed by using io.livekit.android.util.flow
A ParticipantEvent.NameChanged event is emitted from events whenever this changes.
-
setName
@VisibleForTesting() final Unit setName(@FlowObservable() String name)
-
getMetadata
@FlowObservable() final String getMetadata()
The metadata for this participant.
Changes can be observed by using io.livekit.android.util.flow
A ParticipantEvent.MetadataChanged event is emitted from events whenever this changes.
-
setMetadata
@VisibleForTesting() final Unit setMetadata(@FlowObservable() String metadata)
-
getAttributes
@FlowObservable() final Map<String, String> getAttributes()
The attributes set on this participant.
Changes can be observed by using io.livekit.android.util.flow
A ParticipantEvent.AttributesChanged event is emitted from events whenever this changes.
-
setAttributes
@VisibleForTesting() final Unit setAttributes(@FlowObservable() Map<String, String> attributes)
-
getAgentAttributes
@FlowObservable() final AgentAttributes getAgentAttributes()
The agent attributes for this participant.
Changes can be observed by using io.livekit.android.util.flow
A ParticipantEvent.AttributesChanged event is emitted from events whenever this changes.
-
setAgentAttributes
final Unit setAgentAttributes(@FlowObservable() AgentAttributes agentAttributes)
The agent attributes for this participant.
Changes can be observed by using io.livekit.android.util.flow
A ParticipantEvent.AttributesChanged event is emitted from events whenever this changes.
-
getPermissions
@FlowObservable() final ParticipantPermission getPermissions()
The permissions for this participant.
Changes can be observed by using io.livekit.android.util.flow
A ParticipantEvent.ParticipantPermissionsChanged event is emitted from events whenever this changes.
-
setPermissions
final Unit setPermissions(@FlowObservable() ParticipantPermission permissions)
-
getConnectionQuality
@FlowObservable() final ConnectionQuality getConnectionQuality()
Changes can be observed by using io.livekit.android.util.flow
-
setConnectionQuality
final Unit setConnectionQuality(@FlowObservable() ConnectionQuality connectionQuality)
-
getJoinedAt
final Long getJoinedAt()
-
getLastSpokeAt
@FlowObservable() final Long getLastSpokeAt()
Timestamp when the participant last started speaking, in milliseconds
-
setLastSpokeAt
final Unit setLastSpokeAt(@FlowObservable() Long lastSpokeAt)
-
getKind
@FlowObservable() final Participant.Kind getKind()
The kind of participant (i.e. a standard client participant, AI agent, etc.)
-
setKind
final Unit setKind(@FlowObservable() Participant.Kind kind)
-
getHasInfo
final Boolean getHasInfo()
-
getTrackPublications
@FlowObservable() final <ERROR CLASS> getTrackPublications()
Maps track sids to their track publications.
Changes can be observed by using io.livekit.android.util.flow
-
setTrackPublications
final Unit )>setTrackPublications(@FlowObservable() <ERROR CLASS> trackPublications)
-
getAudioTrackPublications
@FlowObservable() final <ERROR CLASS> getAudioTrackPublications()
Changes can be observed by using io.livekit.android.util.flow
-
getVideoTrackPublications
@FlowObservable() final <ERROR CLASS> getVideoTrackPublications()
Changes can be observed by using io.livekit.android.util.flow
-
getIsMicrophoneEnabled
@FlowObservable() final <ERROR CLASS> getIsMicrophoneEnabled()
-
getIsCameraEnabled
@FlowObservable() final <ERROR CLASS> getIsCameraEnabled()
-
getIsScreenShareEnabled
@FlowObservable() final <ERROR CLASS> getIsScreenShareEnabled()
-
getSid
final Participant.Sid getSid()
-
setSid
final Unit setSid(Participant.Sid sid)
-
getTrackPublication
final RemoteTrackPublication getTrackPublication(String sid)
Get a track publication with the corresponding sid.
-
unpublishTrack
final Unit unpublishTrack(String trackSid, Boolean sendUnpublish)
-
-
-
-