Class DataTrackStream.ReadFrameInstruction
- Namespace
- LiveKit
YieldInstruction for reading a single frame from a DataTrackStream.
public sealed class DataTrackStream.ReadFrameInstruction : CustomYieldInstruction
- Inheritance
-
DataTrackStream.ReadFrameInstruction
- Extension Methods
Remarks
Usage: while IsEos is false (i.e. the subscription has not ended), call ReadFrame(), yield the instruction, then check IsCurrentReadDone and access Frame.
Properties
Error
If the track could not be subscribed to, a desciption of the error. Null if the stream ended normally (i.e., due to the track being unpublished).
public SubscribeDataTrackError Error { get; }
Property Value
Frame
The received data track frame.
public DataTrackFrame Frame { get; }
Property Value
IsCurrentReadDone
True if a frame has been received for the current read.
public bool IsCurrentReadDone { get; }
Property Value
IsEos
True if the subscription has ended (end of stream).
public bool IsEos { get; }
Property Value
keepWaiting
public override bool keepWaiting { get; }