From e509c328f1902eb22223e9d07b5baee1c61c3fe4 Mon Sep 17 00:00:00 2001 From: MK3S+ Printer Date: Mon, 10 Oct 2022 20:27:22 +0200 Subject: [PATCH] Disable usage of STUN server (it should not be needed for local) --- html/webrtc.html | 2 +- output/webrtc/webrtc.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/html/webrtc.html b/html/webrtc.html index c2e39bb..4646c5a 100644 --- a/html/webrtc.html +++ b/html/webrtc.html @@ -51,7 +51,7 @@ sdpSemantics: 'unified-plan' }; - if (!document.getElementById('use-stun') || document.getElementById('use-stun').checked) { + if (document.getElementById('use-stun') && document.getElementById('use-stun').checked) { config.iceServers = [{urls: ['stun:stun.l.google.com:19302']}]; } diff --git a/output/webrtc/webrtc.cc b/output/webrtc/webrtc.cc index 60c3fdd..07b5a94 100644 --- a/output/webrtc/webrtc.cc +++ b/output/webrtc/webrtc.cc @@ -33,8 +33,8 @@ static const auto webrtc_client_lock_timeout = 3 * 1000ms; static const auto webrtc_client_max_json_body = 10 * 1024; static const auto webrtc_client_video_payload_type = 102; // H264 static const rtc::Configuration webrtc_configuration = { - .iceServers = { rtc::IceServer("stun:stun.l.google.com:19302") }, - .disableAutoNegotiation = true + // .iceServers = { rtc::IceServer("stun:stun.l.google.com:19302") }, + .disableAutoNegotiation = true }; struct ClientTrackData