Table of Contents

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

SubscribeDataTrackError

Frame

The received data track frame.

public DataTrackFrame Frame { get; }

Property Value

DataTrackFrame

IsCurrentReadDone

True if a frame has been received for the current read.

public bool IsCurrentReadDone { get; }

Property Value

bool

IsEos

True if the subscription has ended (end of stream).

public bool IsEos { get; }

Property Value

bool

keepWaiting

public override bool keepWaiting { get; }

Property Value

bool