Package com.twilio.video
Class RemoteDataTrackPublication
java.lang.Object
com.twilio.video.RemoteDataTrackPublication
- All Implemented Interfaces:
DataTrackPublication
,TrackPublication
A remote data track publication represents a
RemoteDataTrack
.-
Method Summary
Modifier and TypeMethodDescriptionLocalDataTrackPublication
andRemoteDataTrackPublication
extendDataTrackPublication
and each interface implements getDataTrack with different nullability behavior.Returns theTrackPriority
set by the publisher for the correspondingRemoteDataTrack
.Returns the published remote data track.Returns the name of the published data track.Returns the remote data track's server identifier.boolean
Returns true if the published data track is enabled or false otherwise.boolean
Check if the remote data track is subscribed to by theLocalParticipant
.
-
Method Details
-
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
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:
-
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
Returns theTrackPriority
set by the publisher for the correspondingRemoteDataTrack
. ReturnsTrackPriority.STANDARD
if no priority was specified by the publisher. -
getRemoteDataTrack
Returns the published remote data track.null
is returned if the track is not subscribed to.
-