public class LocalParticipant extends Object implements Participant
Room
you are connected to.Modifier and Type | Class and Description |
---|---|
static interface |
LocalParticipant.Listener
Interface that provides
LocalParticipant events. |
Modifier and Type | Method and Description |
---|---|
List<AudioTrackPublication> |
getAudioTracks()
Returns read-only list of audio track publications.
|
List<DataTrackPublication> |
getDataTracks()
Returns read-only list of data track publications.
|
String |
getIdentity()
Returns the identity of the local participant.
|
List<LocalAudioTrackPublication> |
getLocalAudioTracks()
Returns read-only list of local audio track publications.
|
List<LocalDataTrackPublication> |
getLocalDataTracks()
Returns read-only list of local data track publications.
|
List<LocalVideoTrackPublication> |
getLocalVideoTracks()
Returns read-only list of local video track publications.
|
NetworkQualityLevel |
getNetworkQualityLevel()
Returns the
LocalParticipant 's Network Quality Level. |
String |
getSid()
Returns the SID of the local participant.
|
String |
getSignalingRegion()
Where the
LocalParticipant 's signaling traffic enters and exits Twilio's
communications cloud. |
List<VideoTrackPublication> |
getVideoTracks()
Returns read-only list of video track publications.
|
boolean |
publishTrack(LocalAudioTrack localAudioTrack)
Shares audio track to all participants in a
Room with default LocalTrackPublicationOptions . |
boolean |
publishTrack(LocalAudioTrack localAudioTrack,
LocalTrackPublicationOptions localTrackPublicationOptions)
Shares audio track to all participants in a
Room with the provided LocalTrackPublicationOptions . |
boolean |
publishTrack(LocalDataTrack localDataTrack)
Shared data track to all participants in a
Room with default LocalTrackPublicationOptions . |
boolean |
publishTrack(LocalDataTrack localDataTrack,
LocalTrackPublicationOptions localTrackPublicationOptions)
Shared data track to all participants in a
Room with the provided LocalTrackPublicationOptions . |
boolean |
publishTrack(LocalVideoTrack localVideoTrack)
Shares video track to all participants in a
Room with default LocalTrackPublicationOptions . |
boolean |
publishTrack(LocalVideoTrack localVideoTrack,
LocalTrackPublicationOptions localTrackPublicationOptions)
Shares video track to all participants in a
Room with the provided LocalTrackPublicationOptions . |
void |
setEncodingParameters(EncodingParameters encodingParameters)
Updates the
EncodingParameters used to share media in the Room. |
void |
setListener(LocalParticipant.Listener listener)
Set listener for local participant events.
|
boolean |
unpublishTrack(LocalAudioTrack localAudioTrack)
Stops the sharing of an audio track to all the participants in a
Room . |
boolean |
unpublishTrack(LocalDataTrack localDataTrack)
Stops the sharing of a data track to all the participants in a
Room . |
boolean |
unpublishTrack(LocalVideoTrack localVideoTrack)
Stops the sharing of a video track to all the participants in a
Room . |
public String getSid()
getSid
in interface Participant
public String getIdentity()
getIdentity
in interface Participant
public NetworkQualityLevel getNetworkQualityLevel()
LocalParticipant
's Network Quality Level.getNetworkQualityLevel
in interface Participant
Participant.getNetworkQualityLevel()
public String getSignalingRegion()
LocalParticipant
's signaling traffic enters and exits Twilio's
communications cloud. This property reflects the region passed to ConnectOptions.Builder.region(String)
and when `gll` (the default value) is provided, the
region that was selected using latency based routing.public List<AudioTrackPublication> getAudioTracks()
getAudioTracks
in interface Participant
public List<VideoTrackPublication> getVideoTracks()
getVideoTracks
in interface Participant
public List<DataTrackPublication> getDataTracks()
getDataTracks
in interface Participant
public List<LocalAudioTrackPublication> getLocalAudioTracks()
public List<LocalVideoTrackPublication> getLocalVideoTracks()
public List<LocalDataTrackPublication> getLocalDataTracks()
public boolean publishTrack(LocalAudioTrack localAudioTrack)
Room
with default LocalTrackPublicationOptions
.localAudioTrack
- the local audio track to publishpublic boolean publishTrack(LocalAudioTrack localAudioTrack, LocalTrackPublicationOptions localTrackPublicationOptions)
Room
with the provided LocalTrackPublicationOptions
.localAudioTrack
- the local audio track to publishlocalTrackPublicationOptions
- the local track publication options used to publish the
local audio trackpublic boolean publishTrack(LocalVideoTrack localVideoTrack)
Room
with default LocalTrackPublicationOptions
.localVideoTrack
- the local video track to publishpublic boolean publishTrack(LocalVideoTrack localVideoTrack, LocalTrackPublicationOptions localTrackPublicationOptions)
Room
with the provided LocalTrackPublicationOptions
.localVideoTrack
- the local video track to publishlocalTrackPublicationOptions
- the local track publication options used to publish the
local video trackpublic boolean publishTrack(LocalDataTrack localDataTrack)
Room
with default LocalTrackPublicationOptions
.localDataTrack
- the local data track to publishpublic boolean publishTrack(LocalDataTrack localDataTrack, LocalTrackPublicationOptions localTrackPublicationOptions)
Room
with the provided LocalTrackPublicationOptions
.localDataTrack
- the local data track to publishlocalTrackPublicationOptions
- the local track publication options used to publish the
local data trackpublic boolean unpublishTrack(LocalAudioTrack localAudioTrack)
Room
.public boolean unpublishTrack(LocalVideoTrack localVideoTrack)
Room
.public boolean unpublishTrack(LocalDataTrack localDataTrack)
Room
.public void setListener(LocalParticipant.Listener listener)
listener
- of local participant events.public void setEncodingParameters(EncodingParameters encodingParameters)
EncodingParameters
used to share media in the Room.encodingParameters
- The EncodingParameters
to use or null
for the
default values.5.13.0