forked from Github/frigate
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:
@@ -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µphone"
|
||||
)
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user