Set ice candidates server (#285)

* Add code

* Add code

* Code
This commit is contained in:
Freddy Boulton
2025-04-17 10:20:53 -04:00
committed by GitHub
parent 72fdc74e82
commit c9bca428af
7 changed files with 59 additions and 21 deletions

View File

@@ -13,6 +13,7 @@ from fastrtc import (
AdditionalOutputs,
ReplyOnPause,
Stream,
get_cloudflare_turn_credentials,
get_cloudflare_turn_credentials_async,
get_stt_model,
)
@@ -76,6 +77,7 @@ stream = Stream(
additional_outputs_handler=lambda *a: (a[2], a[3]),
concurrency_limit=20 if get_space() else None,
rtc_configuration=get_cloudflare_turn_credentials_async,
server_rtc_configuration=get_cloudflare_turn_credentials(ttl=36_000),
)
app = FastAPI()