Spaces:
Sleeping
Sleeping
- revert websocket from frontend
Browse files- frontend/index.html +1 -1
frontend/index.html
CHANGED
|
@@ -177,7 +177,7 @@
|
|
| 177 |
return;
|
| 178 |
}
|
| 179 |
|
| 180 |
-
ws = new WebSocket(
|
| 181 |
|
| 182 |
document.getElementById("music-player").addEventListener("play", () => {
|
| 183 |
musicStatus = "playing"
|
|
|
|
| 177 |
return;
|
| 178 |
}
|
| 179 |
|
| 180 |
+
ws = new WebSocket(`${location.protocol === 'https:' ? 'wss' : 'ws'}://${location.host}/chat/${username}`);
|
| 181 |
|
| 182 |
document.getElementById("music-player").addEventListener("play", () => {
|
| 183 |
musicStatus = "playing"
|