TVILocalDataTrack Class Reference
| Inherits from | TVIDataTrack : TVITrack : NSObject | 
|---|---|
| Declared in | TVILocalDataTrack.h | 
Overview
A data track represents a unidirectional data source that can be used to send messages to participants of a Room.
– init
	Developers shouldn’t initialize this class directly.
- (null_unspecified instancetype)initDiscussion
Use track or trackWithOptions:name: to create a TVILocalDataTrack.
Declared In
TVILocalDataTrack.h
– sendString:
	Send a string message.
- (void)sendString:(nonnull NSString *)messageParameters
| message | The string message. | 
|---|
Declared In
TVILocalDataTrack.h
– sendData:
	Send a binary message.
- (void)sendData:(nonnull NSData *)messageParameters
| message | The binary message. | 
|---|
Declared In
TVILocalDataTrack.h
+ track
	Creates a TVILocalDataTrack with the default settings.
+ (nullable instancetype)trackReturn Value
A Track which is ready to be shared with Participants in a Room, or nil if an error occurs.
Discussion
This method uses the default TVIDataTrackOptions, and produces an enabled Track.
Declared In
TVILocalDataTrack.h
+ trackWithOptions:
	Creates a TVILocalDataTrack with TVIDataTrackOptions.
+ (nullable instancetype)trackWithOptions:(nullable TVIDataTrackOptions *)optionsParameters
| options | An instance of  | 
|---|
Return Value
A Track which is ready to be shared with Participants in a Room, or nil if an error occurs.
Discussion
This method allows you to provide specific TVIDataTrackOptions.
Declared In
TVILocalDataTrack.h