From f1b60f76eb4e018b48915cb0ed8de8e8f50c039f Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Tue, 7 Nov 2023 04:33:33 -0700 Subject: [PATCH] Fix go2rtc UDP port default config (#8469) * Fix go2rtc UDP port * fix * Use correct port * fix comment Co-authored-by: Blake Blackshear --------- Co-authored-by: Blake Blackshear --- docker/main/rootfs/usr/local/go2rtc/create_config.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docker/main/rootfs/usr/local/go2rtc/create_config.py b/docker/main/rootfs/usr/local/go2rtc/create_config.py index a7ffaf2da..7c6b7b56e 100644 --- a/docker/main/rootfs/usr/local/go2rtc/create_config.py +++ b/docker/main/rootfs/usr/local/go2rtc/create_config.py @@ -58,7 +58,15 @@ if go2rtc_config.get("log") is None: elif go2rtc_config["log"].get("format") is None: go2rtc_config["log"]["format"] = "text" -if not go2rtc_config.get("webrtc", {}).get("candidates", []): +# ensure there is a default webrtc config +if not go2rtc_config.get("webrtc"): + go2rtc_config["webrtc"] = {} + +# go2rtc should listen on 8555 tcp & udp by default +if not go2rtc_config["webrtc"].get("listen"): + go2rtc_config["webrtc"]["listen"] = ":8555" + +if not go2rtc_config["webrtc"].get("candidates", []): default_candidates = [] # use internal candidate if it was discovered when running through the add-on internal_candidate = os.environ.get(