Table of Contents

Class IngressServiceClient

Namespace
Livekit.Server.Sdk.Dotnet
Assembly
LivekitApi.dll

Client of the LiveKit Ingress service: brings RTMP, WHIP or URL media into rooms. See Ingress overview.

public class IngressServiceClient : BaseService
Inheritance
IngressServiceClient
Inherited Members

Constructors

IngressServiceClient(string, string, string, HttpClient)

Creates the client.

public IngressServiceClient(string host, string apiKey = null, string apiSecret = null, HttpClient client = null)

Parameters

host string

URL of the LiveKit server, http(s):// or ws(s)://; a subpath such as https://host/livekit is kept.

apiKey string

API key; the LIVEKIT_API_KEY environment variable when omitted.

apiSecret string

API secret; the LIVEKIT_API_SECRET environment variable when omitted.

client HttpClient

Optional HttpClient to send the requests with. The SDK never modifies it, so it can be shared with other clients and code.

Methods

CreateIngress(CreateIngressRequest)

Creates a new ingress. Default audio and video options will be used if none is provided.

public Task<IngressInfo> CreateIngress(CreateIngressRequest request)

Parameters

request CreateIngressRequest

Input type (RTMP, WHIP or URL), name, the room and participant to publish as, and the encoding options.

Returns

Task<IngressInfo>

The created ingress, including the URL and stream key to push media to.

DeleteIngress(DeleteIngressRequest)

Deletes an ingress.

public Task<IngressInfo> DeleteIngress(DeleteIngressRequest request)

Parameters

request DeleteIngressRequest

Ingress ID.

Returns

Task<IngressInfo>

The deleted ingress.

ListIngress(ListIngressRequest)

Lists the ingresses, optionally filtered by room or ingress ID.

public Task<ListIngressResponse> ListIngress(ListIngressRequest request)

Parameters

request ListIngressRequest

Optional filters: room name, ingress ID.

Returns

Task<ListIngressResponse>

The matching ingresses.

UpdateIngress(UpdateIngressRequest)

Updates the existing ingress with the given ingressID. Only inactive ingress can be updated.

public Task<IngressInfo> UpdateIngress(UpdateIngressRequest request)

Parameters

request UpdateIngressRequest

Ingress ID and the fields to change.

Returns

Task<IngressInfo>

The updated ingress.