From 5111dfbf2d94bee0897b5905a9f8ee7ab9a69e98 Mon Sep 17 00:00:00 2001 From: Nicolas Pomepuy Date: Tue, 8 Nov 2022 08:35:05 +0100 Subject: [PATCH] Webserver: use the right url for web sockets and artwork queries --- buildsystem/network-sharing-server/js/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildsystem/network-sharing-server/js/app.js b/buildsystem/network-sharing-server/js/app.js index d823a0fce..1abf2b891 100644 --- a/buildsystem/network-sharing-server/js/app.js +++ b/buildsystem/network-sharing-server/js/app.js @@ -13,7 +13,7 @@ import index from "../html/index.html" //const playerWS = new WebSocket("wss://"+window.location.origin+"/echo", "protocolOne"); -const playerWS = new WebSocket("ws://192.168.1.83:8080/echo", "player"); +const playerWS = new WebSocket("ws://"+location.host+"/echo", "player"); playerWS.onopen = (event) => { }; @@ -76,7 +76,7 @@ playerWS.onmessage = (event) => { time.textContent = msecToTime(new Date(msg.progress)) duration.textContent = msecToTime(new Date(msg.duration)) if (lastLoadedMediaUri != msg.uri) { - artwork.src = "http://192.168.1.83:8080/artwork?randomizer="+Date.now() + artwork.src = "http://"+location.host+"/artwork?randomizer="+Date.now() lastLoadedMediaUri = msg.uri }