forked from openlp/openlp
fix the url to be dynamic
This commit is contained in:
parent
4b2aa784d4
commit
ea382e18bb
@ -149,7 +149,7 @@ window.OpenLP = {
|
|||||||
pollServer: function () {
|
pollServer: function () {
|
||||||
if ("WebSocket" in window) {
|
if ("WebSocket" in window) {
|
||||||
// Let us open a web socket
|
// Let us open a web socket
|
||||||
var ws = new WebSocket("ws://192.168.0.51:4318/poll");
|
var ws = new WebSocket('ws://' + location.hostname + ':4318/poll');
|
||||||
ws.binaryType = 'arraybuffer';
|
ws.binaryType = 'arraybuffer';
|
||||||
ws.onmessage = function (evt) {
|
ws.onmessage = function (evt) {
|
||||||
var msg = JSON.parse(String.fromCharCode.apply(null, new Uint8Array(evt.data)));
|
var msg = JSON.parse(String.fromCharCode.apply(null, new Uint8Array(evt.data)));
|
||||||
|
Loading…
Reference in New Issue
Block a user