|
20 | 20 | UpdateSubscriptionsResponse, |
21 | 21 | ForwardParticipantRequest, |
22 | 22 | ForwardParticipantResponse, |
| 23 | + MoveParticipantRequest, |
| 24 | + MoveParticipantResponse, |
23 | 25 | ) |
24 | 26 | from livekit.protocol.models import Room, ParticipantInfo |
25 | 27 | from ._service import Service |
@@ -223,6 +225,32 @@ async def forward_participant(self, forward: ForwardParticipantRequest) -> None: |
223 | 225 | ForwardParticipantResponse, |
224 | 226 | ) |
225 | 227 |
|
| 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, |
| 247 | + room=move.room, |
| 248 | + destination_room=move.destination_room, |
| 249 | + ) |
| 250 | + ), |
| 251 | + MoveParticipantResponse, |
| 252 | + ) |
| 253 | + |
226 | 254 | async def mute_published_track( |
227 | 255 | self, |
228 | 256 | update: MuteRoomTrackRequest, |
|
0 commit comments