Class: RemoteDataTrack

RemoteDataTrack

A RemoteDataTrack represents data published to a Room by a RemoteParticipant.


Properties:
Name Type Argument Description
isEnabled boolean

true

isSubscribed boolean

Whether the RemoteDataTrack is subscribed to

isSwitchedOff boolean

Whether the RemoteDataTrack is switched off

kind Track.Kind

"data"

maxPacketLifeTime number <nullable>

If non-null, this represents a time limit (in milliseconds) during which data will be transmitted or retransmitted if not acknowledged on the underlying RTCDataChannel.

maxRetransmits number <nullable>

If non-null, this represents the number of times the data will be retransmitted if not successfully received on the underlying RTCDataChannel.

ordered boolean

true if data on the RemoteDataTrack can be received out-of-order.

priority Track.Priority <nullable>

The subscribe priority of the RemoteDataTrack

reliable boolean

This is true if both maxPacketLifeTime and maxRetransmits are set to null. In other words, if this is true, there is no bound on packet lifetime or the number of retransmits that will be attempted, ensuring "reliable" transmission.

sid Track.SID

The SID assigned to the RemoteDataTrack

Fires:

Extends

Methods


setPriority(priority)

Update the subscriber Track.Priority of the RemoteDataTrack.

Parameters:
Name Type Argument Description
priority Track.Priority <nullable>

the new Track.priority; Currently setPriority has no effect on data tracks.

Throws:
RangeError
Returns:
Type
this

Events


message

A message was received over the RemoteDataTrack.

Parameters:
Name Type Description
data string | ArrayBuffer
track RemoteDataTrack

The RemoteDataTrack that received the message


switchedOff

A RemoteDataTrack was switched off.

Parameters:
Name Type Description
track RemoteDataTrack

The RemoteDataTrack that was switched off


switchedOn

A RemoteDataTrack was switched on.

Parameters:
Name Type Description
track RemoteDataTrack

The RemoteDataTrack that was switched on