fix: add STUN server for WebRTC NAT traversal

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Administrator 2026-03-12 07:26:28 +01:00
parent 7b9362756d
commit a5c5041ec8

View File

@ -34,7 +34,9 @@ async function getCaptureStream() {
async function handleOffer(clientId, offer, role) { async function handleOffer(clientId, offer, role) {
const stream = await getCaptureStream(); const stream = await getCaptureStream();
const pc = new RTCPeerConnection({ iceServers: [] }); const pc = new RTCPeerConnection({
iceServers: [{ urls: 'stun:stun.l.google.com:19302' }]
});
clients.set(clientId, { pc, role }); clients.set(clientId, { pc, role });
// Add video tracks // Add video tracks