diff --git a/livekit-api/livekit/api/room_service.py b/livekit-api/livekit/api/room_service.py index 3d521548..5c0e3b76 100644 --- a/livekit-api/livekit/api/room_service.py +++ b/livekit-api/livekit/api/room_service.py @@ -20,6 +20,8 @@ UpdateSubscriptionsResponse, ForwardParticipantRequest, ForwardParticipantResponse, + MoveParticipantRequest, + MoveParticipantResponse, ) from livekit.protocol.models import Room, ParticipantInfo from ._service import Service @@ -223,6 +225,32 @@ async def forward_participant(self, forward: ForwardParticipantRequest) -> None: ForwardParticipantResponse, ) + async def move_participant(self, move: MoveParticipantRequest) -> None: + """Moves a participant from one room to another. + + This feature is only available for LiveKit Cloud/Private Cloud. + + Args: + move (MoveParticipantRequest): arg containing: + - room: str - Room name + - identity: str - Participant identity + - destination_room: str - Destination room name + """ + # currently nothing is returned + await self._client.request( + SVC, + "MoveParticipant", + move, + self._auth_header( + VideoGrants( + room_admin=True, + room=move.room, + destination_room=move.destination_room, + ) + ), + MoveParticipantResponse, + ) + async def mute_published_track( self, update: MuteRoomTrackRequest,