Skip to content

feat(room_service): move participant api #440

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions livekit-api/livekit/api/room_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
UpdateSubscriptionsResponse,
ForwardParticipantRequest,
ForwardParticipantResponse,
MoveParticipantRequest,
MoveParticipantResponse,
)
from livekit.protocol.models import Room, ParticipantInfo
from ._service import Service
Expand Down Expand Up @@ -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,
Expand Down
Loading