demo mount to fastapi
This commit is contained in:
@@ -18,6 +18,11 @@ const PROTOCOL = "va.ws.v1";
|
||||
const MAX_WS_LOG_LINES = 120;
|
||||
const AUDIO_DELTA_LOG_INTERVAL_MS = 1000;
|
||||
|
||||
function defaultWsUrl() {
|
||||
const scheme = location.protocol === "https:" ? "wss:" : "ws:";
|
||||
return `${scheme}//${location.host}/ws-product`;
|
||||
}
|
||||
|
||||
const els = {
|
||||
url: document.getElementById("ws-url"),
|
||||
connectBtn: document.getElementById("connect-btn"),
|
||||
@@ -885,6 +890,8 @@ window.addEventListener("beforeunload", () => {
|
||||
}
|
||||
});
|
||||
|
||||
els.url.value = defaultWsUrl();
|
||||
|
||||
setStatus("idle", "Disconnected");
|
||||
setConnectButton();
|
||||
setMicButton();
|
||||
|
||||
Reference in New Issue
Block a user