Modifier and Type | Method and Description |
---|---|
static LocalDataTrack |
create(android.content.Context context)
Creates a local data track with no name and
DataTrackOptions.DEFAULT_DATA_TRACK_OPTIONS . |
static LocalDataTrack |
create(android.content.Context context,
DataTrackOptions dataTrackOptions)
Creates a local data track with no name and provided data track options.
|
java.lang.String |
getName()
Returns the local data track name.
|
boolean |
isEnabled()
Check if this data track is enabled.
|
void |
release()
Releases native memory owned by data track.
|
void |
send(java.nio.ByteBuffer messageBuffer)
Send binary message.
|
void |
send(java.lang.String message)
Send string message.
|
getMaxPacketLifeTime, getMaxRetransmits, isOrdered, isReliable
@Nullable public static LocalDataTrack create(@NonNull android.content.Context context)
DataTrackOptions.DEFAULT_DATA_TRACK_OPTIONS
.context
- application context.@Nullable public static LocalDataTrack create(@NonNull android.content.Context context, @Nullable DataTrackOptions dataTrackOptions)
context
- application context.dataTrackOptions
- data track options.public void send(@NonNull java.nio.ByteBuffer messageBuffer)
messageBuffer
- binary messagepublic void send(@NonNull java.lang.String message)
message
- string message.public boolean isEnabled()
DataTrack
@NonNull public java.lang.String getName()
public void release()
7.0.0