update CHANGELOG and fix formatting

This commit is contained in:
Aleix Conchillo Flaqué
2025-01-30 08:55:29 -08:00
parent f90c17ab30
commit e69c065a86
6 changed files with 38 additions and 17 deletions

View File

@@ -1,3 +1,9 @@
#
# Copyright (c) 2025, Daily
#
# SPDX-License-Identifier: BSD 2-Clause License
#
import json
import uvicorn
@@ -16,11 +22,13 @@ app.add_middleware(
allow_headers=["*"],
)
@app.post("/")
async def start_call():
print("POST TeXML")
return HTMLResponse(content=open("templates/streams.xml").read(), media_type="application/xml")
@app.websocket("/ws")
async def websocket_endpoint(websocket: WebSocket):
await websocket.accept()
@@ -33,5 +41,6 @@ async def websocket_endpoint(websocket: WebSocket):
print("WebSocket connection accepted")
await run_bot(websocket, stream_id, outbound_encoding, "PCMU")
if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=8765)