diff --git a/server/server.js b/server/server.js index f199c8a..fa38161 100644 --- a/server/server.js +++ b/server/server.js @@ -111,6 +111,14 @@ io.on('connection', (socket) => { // Private message to the user io.to(room).emit('privateMessage', { to, privateMessage, from, room }) }) + + // Private message for Signaling PeerConnection + socket.on('privateMessagePCSignaling', ({ desc, to, from, room }) => { + console.log(`User ${from} sends an offer ${to}`); + + // Private signaling to the user + io.to(room).emit('privateMessagePCSignaling', { desc, to, from}) + }) }) server.listen(PORT, () => console.log(`Server Listening on port ${PORT}`)); \ No newline at end of file diff --git a/src/components/ChatDialog.vue b/src/components/ChatDialog.vue index 750cdee..4b26fff 100644 --- a/src/components/ChatDialog.vue +++ b/src/components/ChatDialog.vue @@ -5,37 +5,40 @@ :md-fullscreen="false" :md-click-outside-to-close="false" > -
- -
-
-
- - video_call - - - close - +
+ +
+
+
+ + video_call + + + close + +
+ +

Private chat with {{showDialog.user}}

+ +
+ + + +
- -

Private chat with {{showDialog.user}}

- -
- - - - - -
-
@@ -43,7 +46,7 @@ diff --git a/src/utils/ICEServers.js b/src/utils/ICEServers.js new file mode 100644 index 0000000..4619a8b --- /dev/null +++ b/src/utils/ICEServers.js @@ -0,0 +1,38 @@ +export const servers = { + iceServers: [ + { url: "stun:stun01.sipphone.com" }, + { url: "stun:stun.ekiga.net" }, + { url: "stun:stun.fwdnet.net" }, + { url: "stun:stun.ideasip.com" }, + { url: "stun:stun.iptel.org" }, + { url: "stun:stun.rixtelecom.se" }, + { url: "stun:stun.schlund.de" }, + { url: "stun:stun.l.google.com:19302" }, + { url: "stun:stun1.l.google.com:19302" }, + { url: "stun:stun2.l.google.com:19302" }, + { url: "stun:stun3.l.google.com:19302" }, + { url: "stun:stun4.l.google.com:19302" }, + { url: "stun:stunserver.org" }, + { url: "stun:stun.softjoys.com" }, + { url: "stun:stun.voiparound.com" }, + { url: "stun:stun.voipbuster.com" }, + { url: "stun:stun.voipstunt.com" }, + { url: "stun:stun.voxgratia.org" }, + { url: "stun:stun.xten.com" }, + { + url: "turn:numb.viagenie.ca", + credential: "muazkh", + username: "webrtc@live.com" + }, + { + url: "turn:192.158.29.39:3478?transport=udp", + credential: "JZEOEt2V3Qb0y27GRntt2u2PAYA=", + username: "28224511:1379330808" + }, + { + url: "turn:192.158.29.39:3478?transport=tcp", + credential: "JZEOEt2V3Qb0y27GRntt2u2PAYA=", + username: "28224511:1379330808" + } + ] +} \ No newline at end of file diff --git a/src/utils/logging.js b/src/utils/logging.js new file mode 100644 index 0000000..0e9afb6 --- /dev/null +++ b/src/utils/logging.js @@ -0,0 +1,4 @@ +export const log = (arg) => { + var now = (window.performance.now() / 1000).toFixed(3); + console.log(`${now}: ${arg}`); +} \ No newline at end of file