Class LocalTrackPublication
- Namespace
- LiveKit.Rtc
- Assembly
- LivekitRtc.dll
Local track publication.
public class LocalTrackPublication : TrackPublication
- Inheritance
-
LocalTrackPublication
- Inherited Members
Properties
Participant
The local participant that owns this publication.
public LocalParticipant Participant { get; }
Property Value
Track
The local track.
public LocalTrack? Track { get; }
Property Value
Methods
WaitForSubscriptionAsync(CancellationToken)
Waits until at least one remote participant has subscribed to this track. This is useful when you want to ensure someone is receiving your published track before proceeding (e.g., before starting to send audio/video frames).
public Task WaitForSubscriptionAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenCancellation token to abort the wait.
Returns
- Task
A task that completes when the first subscription occurs.