commit
b193d2d1e5
2 changed files with 6 additions and 2 deletions
|
@ -26,7 +26,7 @@ npm i
|
||||||
node .
|
node .
|
||||||
```
|
```
|
||||||
|
|
||||||
Point your browser to http://localhost:8080 to open the interface.
|
Point your browser to http://localhost:8080 to open the interface. Specify a custom MPD address via a `server` querystring argument (`?server=localhost:6655`).
|
||||||
|
|
||||||
|
|
||||||
## Technology
|
## Technology
|
||||||
|
|
|
@ -143,7 +143,11 @@ export async function init() {
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
try {
|
try {
|
||||||
ws = new WebSocket(`ws://${location.host}/?ticket=${encodeURIComponent(ticket)}`);
|
let url = new URL(location.href);
|
||||||
|
url.protocol = "ws";
|
||||||
|
url.hash = "";
|
||||||
|
url.searchParams.set("ticket", ticket);
|
||||||
|
ws = new WebSocket(url.href);
|
||||||
} catch (e) { reject(e); }
|
} catch (e) { reject(e); }
|
||||||
current = {resolve, reject};
|
current = {resolve, reject};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue