diff options
Diffstat (limited to 'web')
| -rw-r--r-- | web/client.html | 3 |
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 = () => { |
