Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Import a separate file for ICE servers #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions www/iceServers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const ICE_SERVERS = [
{ urls: "stun:stun.l.google.com:19302" },
{ urls: "stun:stun.stunprotocol.org:3478" },
{ urls: "stun:stun.sipnet.net:3478" },
{ urls: "stun:stun.ideasip.com:3478" },
{ urls: "stun:stun.iptel.org:3478" },
{ urls: "turn:numb.viagenie.ca", username: "[email protected]", credential: "d0ntuseme" },
{
urls: [
"turn:173.194.72.127:19305?transport=udp",
"turn:[2404:6800:4008:C01::7F]:19305?transport=udp",
"turn:173.194.72.127:443?transport=tcp",
"turn:[2404:6800:4008:C01::7F]:443?transport=tcp",
],
username: "CKjCuLwFEgahxNRjuTAYzc/s6OMT",
credential: "u1SQDR/SQsPQIxXNWQT7czc/G4c=",
},
];
1 change: 1 addition & 0 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<script defer src="/socket.io/socket.io.js"></script>
<script defer src="vue.min.js"></script>
<script defer src="app.js"></script>
<script defer src="iceServers.js"></script>
<script defer src="script.js"></script>
<title>Talk - Free group video call for the web</title>
<!-- Below line is an alytics script. Delete it if you are deploying it on your own cloud -->
Expand Down
19 changes: 0 additions & 19 deletions www/script.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
/* globals App, io, cabin*/
const ICE_SERVERS = [
{ urls: "stun:stun.l.google.com:19302" },
{ urls: "stun:stun.stunprotocol.org:3478" },
{ urls: "stun:stun.sipnet.net:3478" },
{ urls: "stun:stun.ideasip.com:3478" },
{ urls: "stun:stun.iptel.org:3478" },
{ urls: "turn:numb.viagenie.ca", username: "[email protected]", credential: "d0ntuseme" },
{
urls: [
"turn:173.194.72.127:19305?transport=udp",
"turn:[2404:6800:4008:C01::7F]:19305?transport=udp",
"turn:173.194.72.127:443?transport=tcp",
"turn:[2404:6800:4008:C01::7F]:443?transport=tcp",
],
username: "CKjCuLwFEgahxNRjuTAYzc/s6OMT",
credential: "u1SQDR/SQsPQIxXNWQT7czc/G4c=",
},
];

const APP_URL = (() => {
const protocol = "http" + (location.hostname == "localhost" ? "" : "s") + "://";
return protocol + location.hostname + (location.hostname == "localhost" ? ":3000" : "");
Expand Down