-
- All Implemented Interfaces:
-
com.twilio.video.Participant
public class LocalParticipant implements Participant
Represents the local participant of a Room you are connected to.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceLocalParticipant.ListenerInterface that provides LocalParticipant events.
-
Field Summary
Fields Modifier and Type Field Description private final Stringsidprivate final Stringidentityprivate final StringsignalingRegionprivate NetworkQualityLevelnetworkQualityLevel
-
Method Summary
Modifier and Type Method Description StringgetSid()Returns the SID of the local participant. StringgetIdentity()Returns the identity of the local participant. StringgetSignalingRegion()Where the LocalParticipant's signaling traffic enters and exits Twilio'scommunications cloud. NetworkQualityLevelgetNetworkQualityLevel()Returns the LocalParticipant's Network Quality Level. synchronized Participant.StategetState()Returns participant state. synchronized List<AudioTrackPublication>getAudioTracks()Returns read-only list of audio track publications. synchronized List<VideoTrackPublication>getVideoTracks()Returns read-only list of video track publications. synchronized List<DataTrackPublication>getDataTracks()Returns read-only list of data track publications. synchronized List<LocalAudioTrackPublication>getLocalAudioTracks()Returns read-only list of local audio track publications. synchronized List<LocalVideoTrackPublication>getLocalVideoTracks()Returns read-only list of local video track publications. synchronized List<LocalDataTrackPublication>getLocalDataTracks()Returns read-only list of local data track publications. synchronized booleanpublishTrack(@NonNull() LocalAudioTrack localAudioTrack)Shares audio track to all participants in a Room with default . synchronized booleanpublishTrack(@NonNull() LocalAudioTrack localAudioTrack, @NonNull() LocalTrackPublicationOptions localTrackPublicationOptions)Shares audio track to all participants in a Room with the provided . synchronized booleanpublishTrack(@NonNull() LocalVideoTrack localVideoTrack)Shares video track to all participants in a Room with default . synchronized booleanpublishTrack(@NonNull() LocalVideoTrack localVideoTrack, @NonNull() LocalTrackPublicationOptions localTrackPublicationOptions)Shares video track to all participants in a Room with the provided . synchronized booleanpublishTrack(@NonNull() LocalDataTrack localDataTrack)Shared data track to all participants in a Room with default . synchronized booleanpublishTrack(@NonNull() LocalDataTrack localDataTrack, @NonNull() LocalTrackPublicationOptions localTrackPublicationOptions)Shared data track to all participants in a Room with the provided . synchronized booleanunpublishTrack(@NonNull() LocalAudioTrack localAudioTrack)Stops the sharing of an audio track to all the participants in a Room. synchronized booleanunpublishTrack(@NonNull() LocalVideoTrack localVideoTrack)Stops the sharing of a video track to all the participants in a Room. synchronized booleanunpublishTrack(@NonNull() LocalDataTrack localDataTrack)Stops the sharing of a data track to all the participants in a Room. voidsetListener(@NonNull() LocalParticipant.Listener listener)Set listener for local participant events. synchronized voidsetEncodingParameters(@Nullable() EncodingParameters encodingParameters)Updates the EncodingParameters used to share media in the Room. -
-
Method Detail
-
getIdentity
@NonNull() String getIdentity()
Returns the identity of the local participant.
-
getSignalingRegion
@NonNull() String getSignalingRegion()
Where the LocalParticipant's signaling traffic enters and exits Twilio'scommunications cloud. This property reflects the region passed to and when `gll` (the default value) is provided, theregion that was selected using latency based routing.
-
getNetworkQualityLevel
@NonNull() NetworkQualityLevel getNetworkQualityLevel()
Returns the LocalParticipant's Network Quality Level.
-
getState
@NonNull() synchronized Participant.State getState()
Returns participant state.
-
getAudioTracks
@NonNull() synchronized List<AudioTrackPublication> getAudioTracks()
Returns read-only list of audio track publications.
-
getVideoTracks
@NonNull() synchronized List<VideoTrackPublication> getVideoTracks()
Returns read-only list of video track publications.
-
getDataTracks
@NonNull() synchronized List<DataTrackPublication> getDataTracks()
Returns read-only list of data track publications.
-
getLocalAudioTracks
@NonNull() synchronized List<LocalAudioTrackPublication> getLocalAudioTracks()
Returns read-only list of local audio track publications.
-
getLocalVideoTracks
@NonNull() synchronized List<LocalVideoTrackPublication> getLocalVideoTracks()
Returns read-only list of local video track publications.
-
getLocalDataTracks
@NonNull() synchronized List<LocalDataTrackPublication> getLocalDataTracks()
Returns read-only list of local data track publications.
-
publishTrack
synchronized boolean publishTrack(@NonNull() LocalAudioTrack localAudioTrack)
Shares audio track to all participants in a Room with default .
- Parameters:
localAudioTrack- the local audio track to publish
-
publishTrack
synchronized boolean publishTrack(@NonNull() LocalAudioTrack localAudioTrack, @NonNull() LocalTrackPublicationOptions localTrackPublicationOptions)
Shares audio track to all participants in a Room with the provided .
- Parameters:
localAudioTrack- the local audio track to publishlocalTrackPublicationOptions- the local track publication options used to publish thelocal audio track
-
publishTrack
synchronized boolean publishTrack(@NonNull() LocalVideoTrack localVideoTrack)
Shares video track to all participants in a Room with default .
- Parameters:
localVideoTrack- the local video track to publish
-
publishTrack
synchronized boolean publishTrack(@NonNull() LocalVideoTrack localVideoTrack, @NonNull() LocalTrackPublicationOptions localTrackPublicationOptions)
Shares video track to all participants in a Room with the provided .
- Parameters:
localVideoTrack- the local video track to publishlocalTrackPublicationOptions- the local track publication options used to publish thelocal video track
-
publishTrack
synchronized boolean publishTrack(@NonNull() LocalDataTrack localDataTrack)
Shared data track to all participants in a Room with default .
- Parameters:
localDataTrack- the local data track to publish
-
publishTrack
synchronized boolean publishTrack(@NonNull() LocalDataTrack localDataTrack, @NonNull() LocalTrackPublicationOptions localTrackPublicationOptions)
Shared data track to all participants in a Room with the provided .
- Parameters:
localDataTrack- the local data track to publishlocalTrackPublicationOptions- the local track publication options used to publish thelocal data track
-
unpublishTrack
synchronized boolean unpublishTrack(@NonNull() LocalAudioTrack localAudioTrack)
Stops the sharing of an audio track to all the participants in a Room.
-
unpublishTrack
synchronized boolean unpublishTrack(@NonNull() LocalVideoTrack localVideoTrack)
Stops the sharing of a video track to all the participants in a Room.
-
unpublishTrack
synchronized boolean unpublishTrack(@NonNull() LocalDataTrack localDataTrack)
Stops the sharing of a data track to all the participants in a Room.
-
setListener
void setListener(@NonNull() LocalParticipant.Listener listener)
Set listener for local participant events.
- Parameters:
listener- of local participant events.
-
setEncodingParameters
synchronized void setEncodingParameters(@Nullable() EncodingParameters encodingParameters)
Updates the EncodingParameters used to share media in the Room.
- Parameters:
encodingParameters- The EncodingParameters to use or{@code null}for thedefault values.
-
-
-
-