Merge pull request #1203 from pipecat-ai/expose-update-remote-participants-on-daily-transport

Expose `update_remote_participants()` from `DailyTransport`
This commit is contained in:
Mark Backman
2025-02-11 13:57:08 -05:00
committed by GitHub
2 changed files with 12 additions and 0 deletions

View File

@@ -18,6 +18,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
OpenAI-compatible interface. Also, added foundational example
`14n-function-calling-perplexity.py`.
- Added `DailyTransport.update_remote_participants()`. This allows you to update remote participant's settings, like their permissions or which of their devices are enabled. Requires that the local participant have participant admin permission.
### Changed
- Improved error handling in `AzureTTSService` to properly detect and log

View File

@@ -690,6 +690,13 @@ class DailyTransportClient(EventHandler):
)
await future
async def update_remote_participants(self, remote_participants: Mapping[str, Any] = None):
future = self._get_event_loop().create_future()
self._client.update_remote_participants(
remote_participants=remote_participants, completion=completion_callback(future)
)
await future
#
#
# Daily (EventHandler)
@@ -1167,6 +1174,9 @@ class DailyTransport(BaseTransport):
participant_settings=participant_settings, profile_settings=profile_settings
)
async def update_remote_participants(self, remote_participants: Mapping[str, Any] = None):
await self._client.update_remote_participants(remote_participants=remote_participants)
async def _on_joined(self, data):
await self._call_event_handler("on_joined", data)