using the host from the document.location

This commit is contained in:
Martin Donnelly 2016-11-23 20:43:04 +00:00
parent 4cf040a866
commit 80179091b6

View File

@ -23,7 +23,8 @@ console.log(document.location);
this.startWebSocket = function () {
'use strict';
const url = (wsPort === '') ? wsUrl : wsUrl + ':' + wsPort;
// const url = (wsPort === '') ? wsUrl : wsUrl + ':' + wsPort;
const url = wsUrl;
console.log('Starting socket', url);
const wsCtor = window['MozWebSocket'] ? MozWebSocket : WebSocket;
this.socket = new wsCtor(url, 'stream');