Add startup message for local WebRTC, remove WebRTC from cloud /connect
This commit is contained in:
@@ -296,15 +296,9 @@ def _create_server_app(transport_type: str, host: str = "localhost", proxy: str
|
||||
asyncio.create_task(bot_module.bot(session_args))
|
||||
return {"room_url": room_url, "token": token}
|
||||
|
||||
# TODO: Should the WebRTC client POST to /connect to start the bot?
|
||||
# How should this initialization process work?
|
||||
# Right now, the client connects to `/api/offer` and the bot is started
|
||||
# automatically when the first offer is received. Do we want this?
|
||||
# elif transport_type == "webrtc":
|
||||
# return {"client_url": "/client/"}
|
||||
else:
|
||||
return {
|
||||
"error": f"RTVI connect not supported for {transport_type} transport. Use Daily or WebRTC."
|
||||
"error": f"RTVI connect not supported for {transport_type} transport. Use Daily."
|
||||
}
|
||||
|
||||
return app
|
||||
|
||||
@@ -400,4 +400,11 @@ def main(
|
||||
logger.remove(0)
|
||||
logger.add(sys.stderr, level="TRACE" if args.verbose else "DEBUG")
|
||||
|
||||
# Startup messages for browser-accessible transports
|
||||
if args.transport == "webrtc":
|
||||
print()
|
||||
print(f"🚀 WebRTC server starting at http://{args.host}:{args.port}/client")
|
||||
print(f" Open this URL in your browser to connect!")
|
||||
print()
|
||||
|
||||
_run_main(run, args, transport_params)
|
||||
|
||||
Reference in New Issue
Block a user