Package com.twilio.video
Class LocalDataTrackPublication
- java.lang.Object
-
- com.twilio.video.LocalDataTrackPublication
-
- All Implemented Interfaces:
DataTrackPublication
,TrackPublication
public class LocalDataTrackPublication extends java.lang.Object implements DataTrackPublication
A local data track publication represents aLocalDataTrack
that has been shared to aRoom
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataTrack
getDataTrack()
UnlikeDataTrackPublication
orRemoteDataTrackPublication
thisDataTrack
is guaranteed to be non null.LocalDataTrack
getLocalDataTrack()
Returns the published local data track.TrackPriority
getPriority()
Returns theTrackPriority
of the published local data track.java.lang.String
getTrackName()
Returns the name of the local data track.java.lang.String
getTrackSid()
Returns the local data track's server identifier.boolean
isTrackEnabled()
Check if local data track is enabled.void
setPriority(TrackPriority priority)
Update the publisher'sTrackPriority
for thisLocalDataTrack
after it has been published.
-
-
-
Method Detail
-
getTrackSid
@NonNull public java.lang.String getTrackSid()
Returns the local data track's server identifier. This value uniquely identifies the local data track within the scope of aRoom
.- Specified by:
getTrackSid
in interfaceTrackPublication
-
getTrackName
@NonNull public java.lang.String getTrackName()
Returns the name of the local data track. An empty string is returned if no name was specified.- Specified by:
getTrackName
in interfaceTrackPublication
-
isTrackEnabled
public boolean isTrackEnabled()
Check if local data track is enabled.- Specified by:
isTrackEnabled
in interfaceTrackPublication
-
getDataTrack
public DataTrack getDataTrack()
UnlikeDataTrackPublication
orRemoteDataTrackPublication
thisDataTrack
is guaranteed to be non null.- Specified by:
getDataTrack
in interfaceDataTrackPublication
- Returns:
- Returns the base data track object of the published local data track.
- See Also:
LocalDataTrackPublication
,RemoteDataTrackPublication
-
getLocalDataTrack
@NonNull public LocalDataTrack getLocalDataTrack()
Returns the published local data track.
-
getPriority
@NonNull public TrackPriority getPriority()
Returns theTrackPriority
of the published local data track.
-
setPriority
public void setPriority(TrackPriority priority)
Update the publisher'sTrackPriority
for thisLocalDataTrack
after it has been published. This method is a no-op if theLocalDataTrack
has been unpublished, or theLocalParticipant
has disconnected from theRoom
.- Parameters:
priority
- TheTrackPriority
to be set.
-
-