Class LiveKitEgressService
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 sealed class LiveKitEgressService : TwirpClient, ILiveKitEgressService
- Inheritance
-
LiveKitEgressService
- Implements
- Inherited Members
Constructors
LiveKitEgressService(HttpClient, ILogger<LiveKitEgressService>, ILiveKitTokenService)
Initializes a new instance of the LiveKitEgressService class.
public LiveKitEgressService(HttpClient httpClient, ILogger<LiveKitEgressService> logger, ILiveKitTokenService _tokenService)
Parameters
httpClientHttpClientloggerILogger<LiveKitEgressService>_tokenServiceILiveKitTokenService
Methods
ListEgressAsync(ListEgressRequest, CancellationToken)
Lists active and completed egresses.
public Task<ListEgressResponse> ListEgressAsync(ListEgressRequest request, CancellationToken cancellationToken = default)
Parameters
requestListEgressRequestcancellationTokenCancellationToken
Returns
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.
public Task<EgressInfo> StartParticipantEgressAsync(ParticipantEgressRequest request, CancellationToken cancellationToken = default)
Parameters
requestParticipantEgressRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.
StartRoomCompositeEgressAsync(RoomCompositeEgressRequest, CancellationToken)
Starts a room composite egress (recording or streaming).
public Task<EgressInfo> StartRoomCompositeEgressAsync(RoomCompositeEgressRequest request, CancellationToken cancellationToken = default)
Parameters
requestRoomCompositeEgressRequestcancellationTokenCancellationToken
Returns
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.
public Task<EgressInfo> StartTrackCompositeEgressAsync(TrackCompositeEgressRequest request, CancellationToken cancellationToken = default)
Parameters
requestTrackCompositeEgressRequestcancellationTokenCancellationToken
Returns
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.
public Task<EgressInfo> StartTrackEgressAsync(TrackEgressRequest request, CancellationToken cancellationToken = default)
Parameters
requestTrackEgressRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.
StartWebEgressAsync(WebEgressRequest, CancellationToken)
Starts a web egress to record any website.
public Task<EgressInfo> StartWebEgressAsync(WebEgressRequest request, CancellationToken cancellationToken = default)
Parameters
requestWebEgressRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.
StopEgressAsync(StopEgressRequest, CancellationToken)
Stops an active egress.
public Task<EgressInfo> StopEgressAsync(StopEgressRequest request, CancellationToken cancellationToken = default)
Parameters
requestStopEgressRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.
UpdateLayoutAsync(UpdateLayoutRequest, CancellationToken)
Updates the layout of a web composite egress.
public Task<EgressInfo> UpdateLayoutAsync(UpdateLayoutRequest request, CancellationToken cancellationToken = default)
Parameters
requestUpdateLayoutRequestcancellationTokenCancellationToken
Returns
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.
public Task<EgressInfo> UpdateStreamAsync(UpdateStreamRequest request, CancellationToken cancellationToken = default)
Parameters
requestUpdateStreamRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.