LiveKit JS Client SDK - v2.18.1
    Preparing search index...

    Class RemoteDataTrack

    Implements

    • IRemoteTrack
    • IDataTrack
    Index

    Properties

    info: DataTrackInfo
    isLocal: false
    publisherIdentity: string
    trackSymbol: symbol = TrackSymbol
    typeSymbol: symbol = DataTrackSymbol

    Methods

    • Subscribes to the data track to receive frames.

      Returns

      A stream that yields DataTrackFrames as they arrive.

      Multiple Subscriptions

      An application may call subscribe more than once to process frames in multiple places. For example, one async task might plot values on a graph while another writes them to a file.

      Internally, only the first call to subscribe communicates with the SFU and allocates the resources required to receive frames. Additional subscriptions reuse the same underlying pipeline and do not trigger additional signaling.

      Note that newly created subscriptions only receive frames published after the initial subscription is established.

      Parameters

      Returns ReadableStream<DataTrackFrame>