Fix up other examples

This commit is contained in:
Moishe Lettvin
2024-03-11 13:17:31 -04:00
parent fd2fa23e9c
commit 61c55d2f47
7 changed files with 49 additions and 20 deletions

View File

@@ -140,12 +140,18 @@ async def main(room_url):
)
pipeline_task = pipeline.run_pipeline()
other_joined = asyncio.Event()
@transport.event_handler("on_first_other_participant_joined")
async def on_first_other_participant_joined(transport):
other_joined.set()
async def show_calendar():
await other_joined.wait()
await pipeline_task
await transport.stop_when_done()
await transport.run()
await asyncio.gather(transport.run(), show_calendar())
if __name__ == "__main__":