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 aLocalDataTrackthat has been shared to aRoom.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataTrackgetDataTrack()UnlikeDataTrackPublicationorRemoteDataTrackPublicationthisDataTrackis guaranteed to be non null.LocalDataTrackgetLocalDataTrack()Returns the published local data track.TrackPrioritygetPriority()Returns theTrackPriorityof the published local data track.java.lang.StringgetTrackName()Returns the name of the local data track.java.lang.StringgetTrackSid()Returns the local data track's server identifier.booleanisTrackEnabled()Check if local data track is enabled.voidsetPriority(TrackPriority priority)Update the publisher'sTrackPriorityfor thisLocalDataTrackafter 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:
getTrackSidin 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:
getTrackNamein interfaceTrackPublication
-
isTrackEnabled
public boolean isTrackEnabled()
Check if local data track is enabled.- Specified by:
isTrackEnabledin interfaceTrackPublication
-
getDataTrack
public DataTrack getDataTrack()
UnlikeDataTrackPublicationorRemoteDataTrackPublicationthisDataTrackis guaranteed to be non null.- Specified by:
getDataTrackin 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 theTrackPriorityof the published local data track.
-
setPriority
public void setPriority(TrackPriority priority)
Update the publisher'sTrackPriorityfor thisLocalDataTrackafter it has been published. This method is a no-op if theLocalDataTrackhas been unpublished, or theLocalParticipanthas disconnected from theRoom.- Parameters:
priority- TheTrackPriorityto be set.
-
-