examples: use EndFrame() when the participant leaves

This commit is contained in:
Aleix Conchillo Flaqué
2024-10-18 10:27:53 -07:00
parent 020f371ecb
commit 4550545528
4 changed files with 21 additions and 12 deletions

View File

@@ -129,7 +129,7 @@ async def main():
@transport.event_handler("on_first_participant_joined")
async def on_first_participant_joined(transport, participant):
participant_name = participant["info"]["userName"] or ""
participant_name = participant.get("info", {}).get("userName", "")
transport.capture_participant_transcription(participant["id"])
await task.queue_frames([TextFrame(f"Hi there {participant_name}!")])