Table of Contents

Interface ILiveKitEgressService

Namespace
LiveKit.Services
Assembly
LiveKit.AspNetCore.ServerSdk.Abstractions.dll

Service for recording and streaming rooms, participants, or tracks.

Provides methods for starting and managing egress (recording/streaming) sessions. See LiveKit Egress API Documentation for more information.

public interface ILiveKitEgressService

Methods

ListEgressAsync(ListEgressRequest, CancellationToken)

Lists active and completed egresses.

Task<ListEgressResponse> ListEgressAsync(ListEgressRequest request, CancellationToken cancellationToken = default)

Parameters

request ListEgressRequest
cancellationToken CancellationToken

Returns

Task<ListEgressResponse>

Exceptions

LiveKitApiException

Thrown when the server returns a non-success HTTP status code.

StartParticipantEgressAsync(ParticipantEgressRequest, CancellationToken)

Starts a participant egress to record a single participant.

Task<EgressInfo> StartParticipantEgressAsync(ParticipantEgressRequest request, CancellationToken cancellationToken = default)

Parameters

request ParticipantEgressRequest
cancellationToken CancellationToken

Returns

Task<EgressInfo>

Exceptions

LiveKitApiException

Thrown when the server returns a non-success HTTP status code.

StartRoomCompositeEgressAsync(RoomCompositeEgressRequest, CancellationToken)

Starts a room composite egress (recording or streaming).

Task<EgressInfo> StartRoomCompositeEgressAsync(RoomCompositeEgressRequest request, CancellationToken cancellationToken = default)

Parameters

request RoomCompositeEgressRequest
cancellationToken CancellationToken

Returns

Task<EgressInfo>

Exceptions

LiveKitApiException

Thrown when the server returns a non-success HTTP status code.

StartTrackCompositeEgressAsync(TrackCompositeEgressRequest, CancellationToken)

Starts a track composite egress to record specific tracks.

Task<EgressInfo> StartTrackCompositeEgressAsync(TrackCompositeEgressRequest request, CancellationToken cancellationToken = default)

Parameters

request TrackCompositeEgressRequest
cancellationToken CancellationToken

Returns

Task<EgressInfo>

Exceptions

LiveKitApiException

Thrown when the server returns a non-success HTTP status code.

StartTrackEgressAsync(TrackEgressRequest, CancellationToken)

Starts a track egress to record a single track without transcoding.

Task<EgressInfo> StartTrackEgressAsync(TrackEgressRequest request, CancellationToken cancellationToken = default)

Parameters

request TrackEgressRequest
cancellationToken CancellationToken

Returns

Task<EgressInfo>

Exceptions

LiveKitApiException

Thrown when the server returns a non-success HTTP status code.

StartWebEgressAsync(WebEgressRequest, CancellationToken)

Starts a web egress to record any website.

Task<EgressInfo> StartWebEgressAsync(WebEgressRequest request, CancellationToken cancellationToken = default)

Parameters

request WebEgressRequest
cancellationToken CancellationToken

Returns

Task<EgressInfo>

Exceptions

LiveKitApiException

Thrown when the server returns a non-success HTTP status code.

StopEgressAsync(StopEgressRequest, CancellationToken)

Stops an active egress.

Task<EgressInfo> StopEgressAsync(StopEgressRequest request, CancellationToken cancellationToken = default)

Parameters

request StopEgressRequest
cancellationToken CancellationToken

Returns

Task<EgressInfo>

Exceptions

LiveKitApiException

Thrown when the server returns a non-success HTTP status code.

UpdateLayoutAsync(UpdateLayoutRequest, CancellationToken)

Updates the layout of a web composite egress.

Task<EgressInfo> UpdateLayoutAsync(UpdateLayoutRequest request, CancellationToken cancellationToken = default)

Parameters

request UpdateLayoutRequest
cancellationToken CancellationToken

Returns

Task<EgressInfo>

Exceptions

LiveKitApiException

Thrown when the server returns a non-success HTTP status code.

UpdateStreamAsync(UpdateStreamRequest, CancellationToken)

Adds or removes stream endpoints for an active egress.

Task<EgressInfo> UpdateStreamAsync(UpdateStreamRequest request, CancellationToken cancellationToken = default)

Parameters

request UpdateStreamRequest
cancellationToken CancellationToken

Returns

Task<EgressInfo>

Exceptions

LiveKitApiException

Thrown when the server returns a non-success HTTP status code.