Package com.twilio.video
Class RemoteDataTrackPublication
- java.lang.Object
-
- com.twilio.video.RemoteDataTrackPublication
-
- All Implemented Interfaces:
DataTrackPublication,TrackPublication
public class RemoteDataTrackPublication extends java.lang.Object implements DataTrackPublication
A remote data track publication represents aRemoteDataTrack.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataTrackgetDataTrack()LocalDataTrackPublicationandRemoteDataTrackPublicationextendDataTrackPublicationand each interface implements getDataTrack with different nullability behavior.TrackPrioritygetPublishPriority()Returns theTrackPriorityset by the publisher for the correspondingRemoteDataTrack.RemoteDataTrackgetRemoteDataTrack()Returns the published remote data track.java.lang.StringgetTrackName()Returns the name of the published data track.java.lang.StringgetTrackSid()Returns the remote data track's server identifier.booleanisTrackEnabled()Returns true if the published data track is enabled or false otherwise.booleanisTrackSubscribed()Check if the remote data track is subscribed to by theLocalParticipant.
-
-
-
Method Detail
-
getTrackSid
@NonNull public java.lang.String getTrackSid()
Returns the remote data track's server identifier. This value uniquely identifies the remote data track within the scope of aRoom.- Specified by:
getTrackSidin interfaceTrackPublication
-
getDataTrack
@Nullable public DataTrack getDataTrack()
Description copied from interface:DataTrackPublicationLocalDataTrackPublicationandRemoteDataTrackPublicationextendDataTrackPublicationand each interface implements getDataTrack with different nullability behavior.LocalDataTrackPublication.getDataTrack()is annotated as @NonNull andgetDataTrack()is annotated as @Nullable.This method is marked as @Nullable because at least one of the subclasses returns null.
- Specified by:
getDataTrackin interfaceDataTrackPublication- Returns:
- Returns the published remote data track.
nullis returned if the track is not subscribed to. - See Also:
LocalDataTrackPublication,RemoteDataTrackPublication
-
getTrackName
@NonNull public java.lang.String getTrackName()
Returns the name of the published data track. An empty string is returned if no track name was specified.- Specified by:
getTrackNamein interfaceTrackPublication
-
isTrackEnabled
public boolean isTrackEnabled()
Returns true if the published data track is enabled or false otherwise.- Specified by:
isTrackEnabledin interfaceTrackPublication
-
isTrackSubscribed
public boolean isTrackSubscribed()
Check if the remote data track is subscribed to by theLocalParticipant.
-
getPublishPriority
@NonNull public TrackPriority getPublishPriority()
Returns theTrackPriorityset by the publisher for the correspondingRemoteDataTrack. ReturnsTrackPriority.STANDARDif no priority was specified by the publisher.
-
getRemoteDataTrack
@Nullable public RemoteDataTrack getRemoteDataTrack()
Returns the published remote data track.nullis returned if the track is not subscribed to.
-
-