o
    i#                     @   sn   d dl Z d dlmZmZmZmZmZmZmZm	Z	m
Z
mZmZ ddlmZ ddlmZ dZ	 G dd deZdS )	    N)RoomCompositeEgressRequestWebEgressRequestParticipantEgressRequestTrackCompositeEgressRequestTrackEgressRequestUpdateLayoutRequestUpdateStreamRequestListEgressRequestStopEgressRequest
EgressInfoListEgressResponse   )Service)VideoGrantsEgressc                       s   e Zd ZdZdejdededef fddZded	e	fd
dZ
ded	e	fddZded	e	fddZded	e	fddZded	e	fddZded	e	fddZded	e	fddZded	efddZded	e	fddZ  ZS )EgressServicea  Client for LiveKit Egress Service API

    Recommended way to use this service is via `livekit.api.LiveKitAPI`:

    ```python
    from livekit import api
    lkapi = api.LiveKitAPI()
    egress = lkapi.egress
    ```

    Also see https://docs.livekit.io/home/egress/overview/
    sessionurlapi_key
api_secretc                    s   t  |||| d S )N)super__init__)selfr   r   r   r   	__class__ \/var/www/html/livekit_bhavya/venv/lib/python3.10/site-packages/livekit/api/egress_service.pyr   $   s   zEgressService.__init__startreturnc              
      (   | j td|| tddtI dH S )z'Starts a composite recording of a room.StartRoomCompositeEgressTroom_recordN_clientrequestSVC_auth_headerr   r   r   r   r   r   r   start_room_composite_egress'      
z)EgressService.start_room_composite_egressc              
      r   )z!Starts a recording of a web page.StartWebEgressTr!   Nr#   r(   r   r   r   start_web_egress1   r*   zEgressService.start_web_egressc              
      r   )z$Starts a recording of a participant.StartParticipantEgressTr!   Nr#   r(   r   r   r   start_participant_egress;   r*   z&EgressService.start_participant_egressc              
      r   )z9Starts a composite recording with audio and video tracks.StartTrackCompositeEgressTr!   Nr#   r(   r   r   r   start_track_composite_egressE   r*   z*EgressService.start_track_composite_egressc              
      r   )z%Starts a recording of a single track.StartTrackEgressTr!   Nr#   r(   r   r   r   start_track_egressO   r*   z EgressService.start_track_egressupdatec              
      r   )z,Updates the layout of a composite recording.UpdateLayoutTr!   Nr#   r   r3   r   r   r   update_layoutY   r*   zEgressService.update_layoutc              
      r   )zEUpdates the stream of a RoomComposite, Web, or Participant recording.UpdateStreamTr!   Nr#   r5   r   r   r   update_streamc   r*   zEgressService.update_streamlistc              
      r   )a`  Lists all active egress and recently completed recordings.

        Args:
            list (ListEgressRequest): arg contains optional filters:
                - room_name: str - List all egresses for a specific room
                - egress_id: str - Only list egress with matching ID
                - active: bool - Only list active egresses
        
ListEgressTr!   N)r$   r%   r&   r'   r   r   )r   r9   r   r   r   list_egressm   s   	
zEgressService.list_egressstopc              
      r   )z!Stops an active egress recording.
StopEgressTr!   Nr#   )r   r<   r   r   r   stop_egress~   r*   zEgressService.stop_egress)__name__
__module____qualname____doc__aiohttpClientSessionstrr   r   r   r)   r   r,   r   r.   r   r0   r   r2   r   r6   r   r8   r	   r   r;   r
   r>   __classcell__r   r   r   r   r      s     






r   )rC   livekit.protocol.egressr   r   r   r   r   r   r   r	   r
   r   r   _servicer   access_tokenr   r&   r   r   r   r   r   <module>   s    4