DataTrack
A DataTrack represents data that a Participant can send/receive in a Room.
Kind: global class
Properties
| Name | Type | Description |
|---|---|---|
| id | string | The ID of the DataTrack. |
| kind | string | The kind of the DataTrack (data). |
| name | string | The name of the DataTrack. |
| track | Datatrack | The DataTrack instance. |
| maxPacketLifeTime | number | If non-null, this represents a time limit (in milliseconds) during which data will be transmitted or retransmitted if not acknowledged on the DataChannel. |
| maxRetransmits | number | If non-null, this represents the number of times the data will be retransmitted if not successfully received on the DataChannel. |
| ordered | boolean | Whether or not the data should be transmitted in order. |
| reliable | boolean | Whether or not the data should be transmitted reliably. |
| isSwitchedOff | boolean | Whether or not the RemoteDataTrack is switched off. |
| isEnabled | boolean | Whether or not the RemoteDataTrack is enabled. |
| priority | Track.Priority | The priority of the Remote DataTrack. |
| sid | string | The SID of the Remote DataTrack. |
dataTrack.send(data, [to]) ⇒ void
Send a message over the local DataTrack.
Kind: instance method of DataTrack
| Param | Type | Description |
|---|---|---|
| data | string | Blob | ArrayBuffer | ArrayBufferView | The message to be sent |
| [to] | Participant.ID | Array.<Participant.ID> | The Participant.ID of the RemoteParticipant to send the message to. |
dataTrack.setPriority(priority) ⇒ DataTrack
Update the subscriber Track.Priority of the Remote DataTrack. Currently setPriority has no effect on data tracks.
Kind: instance method of DataTrack
Throws:
RangeError
| Param | Type | Description |
|---|---|---|
| priority | Track.Priority | the new Track.Priority to be set. |