Fix go2rtc UDP port

This commit is contained in:
Nicolas Mowen 2023-11-05 04:19:21 -07:00 committed by GitHub
parent 65e3e67a83
commit a97d46f196
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,7 +58,15 @@ if go2rtc_config.get("log") is None:
elif go2rtc_config["log"].get("format") is None: elif go2rtc_config["log"].get("format") is None:
go2rtc_config["log"]["format"] = "text" go2rtc_config["log"]["format"] = "text"
# ensure there is a default webrtc config
if not go2rtc_config.get("webrtc", {}).get("candidates", []): if not go2rtc_config.get("webrtc", {}).get("candidates", []):
go2rtc_config["webrtc"] = {}
# go2rtc should listen on 5000 tcp & udp by default
if not go2rtc_config["webrtc"].get("listen"):
go2rtc_config["webrtc"]["listen"] = ":5000"
if not go2rtc_config["webrtc"].get("candidates", []):
default_candidates = [] default_candidates = []
# use internal candidate if it was discovered when running through the add-on # use internal candidate if it was discovered when running through the add-on
internal_candidate = os.environ.get( internal_candidate = os.environ.get(