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.
|
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(ByteBuffer messageBuffer)
Send binary message.
|
void |
send(String message)
Send string message.
|
getMaxPacketLifeTime, getMaxRetransmits, isOrdered, isReliable
public static LocalDataTrack create(android.content.Context context)
DataTrackOptions.DEFAULT_DATA_TRACK_OPTIONS
.context
- application context.public static LocalDataTrack create(android.content.Context context, DataTrackOptions dataTrackOptions)
context
- application context.dataTrackOptions
- data track options.public void send(ByteBuffer messageBuffer)
messageBuffer
- binary messagepublic void send(String message)
message
- string message.public boolean isEnabled()
DataTrack
public String getName()
public void release()
5.13.0