Skip to content

Commit 594f824

Browse files
committed
feat(room_service): move participant api
1 parent cc38440 commit 594f824

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

livekit-api/livekit/api/room_service.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
UpdateSubscriptionsResponse,
2121
ForwardParticipantRequest,
2222
ForwardParticipantResponse,
23+
MoveParticipantRequest,
24+
MoveParticipantResponse,
2325
)
2426
from livekit.protocol.models import Room, ParticipantInfo
2527
from ._service import Service
@@ -223,6 +225,30 @@ async def forward_participant(self, forward: ForwardParticipantRequest) -> None:
223225
ForwardParticipantResponse,
224226
)
225227

228+
async def move_participant(self, move: MoveParticipantRequest) -> None:
229+
"""Moves a participant from one room to another.
230+
231+
This feature is only available for LiveKit Cloud/Private Cloud.
232+
233+
Args:
234+
move (MoveParticipantRequest): arg containing:
235+
- room: str - Room name
236+
- identity: str - Participant identity
237+
- destination_room: str - Destination room name
238+
"""
239+
# currently nothing is returned
240+
await self._client.request(
241+
SVC,
242+
"MoveParticipant",
243+
move,
244+
self._auth_header(
245+
VideoGrants(
246+
room_admin=True, room=move.room, destination_room=move.destination_room,
247+
)
248+
),
249+
MoveParticipantResponse,
250+
)
251+
226252
async def mute_published_track(
227253
self,
228254
update: MuteRoomTrackRequest,

0 commit comments

Comments
 (0)