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 DataTrack
getDataTrack()
LocalDataTrackPublication
andRemoteDataTrackPublication
extendDataTrackPublication
and each interface implements getDataTrack with different nullability behavior.TrackPriority
getPublishPriority()
Returns theTrackPriority
set by the publisher for the correspondingRemoteDataTrack
.RemoteDataTrack
getRemoteDataTrack()
Returns the published remote data track.java.lang.String
getTrackName()
Returns the name of the published data track.java.lang.String
getTrackSid()
Returns the remote data track's server identifier.boolean
isTrackEnabled()
Returns true if the published data track is enabled or false otherwise.boolean
isTrackSubscribed()
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:
getTrackSid
in interfaceTrackPublication
-
getDataTrack
@Nullable public DataTrack getDataTrack()
Description copied from interface:DataTrackPublication
LocalDataTrackPublication
andRemoteDataTrackPublication
extendDataTrackPublication
and 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:
getDataTrack
in interfaceDataTrackPublication
- Returns:
- Returns the published remote data track.
null
is 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:
getTrackName
in interfaceTrackPublication
-
isTrackEnabled
public boolean isTrackEnabled()
Returns true if the published data track is enabled or false otherwise.- Specified by:
isTrackEnabled
in interfaceTrackPublication
-
isTrackSubscribed
public boolean isTrackSubscribed()
Check if the remote data track is subscribed to by theLocalParticipant
.
-
getPublishPriority
@NonNull public TrackPriority getPublishPriority()
Returns theTrackPriority
set by the publisher for the correspondingRemoteDataTrack
. ReturnsTrackPriority.STANDARD
if no priority was specified by the publisher.
-
getRemoteDataTrack
@Nullable public RemoteDataTrack getRemoteDataTrack()
Returns the published remote data track.null
is returned if the track is not subscribed to.
-
-