aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-05-21 13:46:05 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2023-05-21 13:46:58 +0200
commite19307db172df51099dc5a69467737ac876e58f0 (patch)
tree1ea7e4bafe776d582ad4ff5920dec85e0700b68d
parentcef46aa5f5b9cac5c43bd842ed64580357718e86 (diff)
downloadWRMS-e19307db172df51099dc5a69467737ac876e58f0.tar.gz
WRMS-e19307db172df51099dc5a69467737ac876e58f0.zip
fix websocket endpoint url
-rw-r--r--web/client.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/web/client.html b/web/client.html
index a330c00..10ba320 100644
--- a/web/client.html
+++ b/web/client.html
@@ -190,7 +190,8 @@
playing.appendChild(songLabel);
}
- let socket = new WebSocket("ws://localhost:8080/ws");
+ let socket_url = "ws://"+location.hostname + (location.port ? ":" + location.port: "") + "/ws";
+ let socket = new WebSocket(socket_url);
console.log("Attempting Connection...");
socket.onopen = () => {