From 08a48b46dc80efae4f3083d1d7a2ce77e5119482 Mon Sep 17 00:00:00 2001 From: Akilan Date: Sun, 26 Feb 2023 00:15:44 +0000 Subject: [PATCH] added changes for custom TURN server --- files/static/main.js | 44 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/files/static/main.js b/files/static/main.js index 1d376dc..3a4ae4b 100644 --- a/files/static/main.js +++ b/files/static/main.js @@ -35,20 +35,48 @@ const displayMediaOptions = { }, }; +// const rtpPeerConnectionOptions = { +// stunGoogle: { +// iceServers: [{ +// urls: [ +// 'stun:stun1.l.google.com:19302', +// 'stun:stun2.l.google.com:19302', +// ], +// }], +// iceCandidatePoolSize: 10, +// }, +// noStun: { +// iceServers: [], +// } +// }; + const rtpPeerConnectionOptions = { stunGoogle: { - iceServers: [{ - urls: [ - 'stun:stun1.l.google.com:19302', - 'stun:stun2.l.google.com:19302', - ], - }], - iceCandidatePoolSize: 10, + iceServers: [ + { + urls: "stun:relay.metered.ca:80", + }, + { + urls: "turn:relay.metered.ca:80", + username: "f0f0d71ba61e44b74c0e4e9e", + credential: "gKLJ6NUO0ZqsVN1D", + }, + { + urls: "turn:relay.metered.ca:443", + username: "f0f0d71ba61e44b74c0e4e9e", + credential: "gKLJ6NUO0ZqsVN1D", + }, + { + urls: "turn:relay.metered.ca:443?transport=tcp", + username: "f0f0d71ba61e44b74c0e4e9e", + credential: "gKLJ6NUO0ZqsVN1D", + }, + ], }, noStun: { iceServers: [], } -}; +} const preset = { balanced: {