added changes for custom TURN server

This commit is contained in:
2023-02-26 00:15:44 +00:00
parent 7e07956e2b
commit 08a48b46dc

View File

@@ -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 = { const rtpPeerConnectionOptions = {
stunGoogle: { stunGoogle: {
iceServers: [{ iceServers: [
urls: [ {
'stun:stun1.l.google.com:19302', urls: "stun:relay.metered.ca:80",
'stun:stun2.l.google.com:19302', },
{
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",
},
], ],
}],
iceCandidatePoolSize: 10,
}, },
noStun: { noStun: {
iceServers: [], iceServers: [],
} }
}; }
const preset = { const preset = {
balanced: { balanced: {