diff --git a/web-service/public/js/bundle.js b/web-service/public/js/bundle.js index df7eec769a1efa2850c96cdede4cd698835a6c56..841fec1722c681b6e6b367b48cdef1d694931753 100644 --- a/web-service/public/js/bundle.js +++ b/web-service/public/js/bundle.js @@ -107,9 +107,10 @@ createCard = (url, viewers) => { createPeer = () => { + peer = null; // FOR PRODUCTION - const ws = new WebSocket("ws://" + location.host + ":" + (location.port == "" ? "80" : location.port) + location.pathname); - // const ws = new WebSocket("ws://localhost:8080") + // const ws = new WebSocket("ws://" + location.host + ":" + (location.port == "" ? "80" : location.port) + location.pathname); + const ws = new WebSocket("ws://localhost:8080") ws.binaryType = "arraybuffer"; peer = new Peer(ws) } diff --git a/web-service/public/js/index.js b/web-service/public/js/index.js index 8ea42a108eefed4a1bcf9a3bddddb2a6c4fa628b..f791757d7504eeb2ceb1f0ebe1657e39a4f66403 100644 --- a/web-service/public/js/index.js +++ b/web-service/public/js/index.js @@ -106,9 +106,10 @@ createCard = (url, viewers) => { createPeer = () => { + peer = null; // FOR PRODUCTION - const ws = new WebSocket("ws://" + location.host + ":" + (location.port == "" ? "80" : location.port) + location.pathname); - // const ws = new WebSocket("ws://localhost:8080") + // const ws = new WebSocket("ws://" + location.host + ":" + (location.port == "" ? "80" : location.port) + location.pathname); + const ws = new WebSocket("ws://localhost:8080") ws.binaryType = "arraybuffer"; peer = new Peer(ws) }