Update go2rtc and implement stream probe to only show 2 way talk when supported (#11407)

* Support two way talk validation

* Fix handling

* Use go2rtc stream info to infer audio output

* Update go2rtc

* Update bundle policy

* Formatting
This commit is contained in:
Nicolas Mowen
2024-05-17 07:30:22 -06:00
committed by GitHub
parent 07eef9b139
commit 97f5ba0145
10 changed files with 91 additions and 12 deletions

View File

@@ -117,6 +117,23 @@ def go2rtc_streams():
return jsonify(stream_data)
@bp.route("/go2rtc/streams/<camera_name>")
def go2rtc_camera_stream(camera_name: str):
r = requests.get(
f"http://127.0.0.1:1984/api/streams?src={camera_name}&video=all&audio=all&microphone"
)
if not r.ok:
logger.error("Failed to fetch streams from go2rtc")
return make_response(
jsonify({"success": False, "message": "Error fetching stream data"}),
500,
)
stream_data = r.json()
for producer in stream_data.get("producers", []):
producer["url"] = clean_camera_user_pass(producer.get("url", ""))
return jsonify(stream_data)
@bp.route("/version")
def version():
return VERSION