Merge pull request #109 from QuentinFuxa/needabetterusername/implement-69

Needabetterusername/implement 69
This commit is contained in:
Quentin Fuxa 2025-04-04 11:10:08 +02:00 committed by GitHub
commit b870c12f62
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -282,7 +282,7 @@
</div> </div>
<div> <div>
<label for="websocketInput">WebSocket URL:</label> <label for="websocketInput">WebSocket URL:</label>
<input id="websocketInput" type="text" value="ws://localhost:8000/asr" /> <input id="websocketInput" type="text" />
</div> </div>
</div> </div>
</div> </div>
@ -319,6 +319,12 @@
const linesTranscriptDiv = document.getElementById("linesTranscript"); const linesTranscriptDiv = document.getElementById("linesTranscript");
const timerElement = document.querySelector(".timer"); const timerElement = document.querySelector(".timer");
const host = window.location.hostname || "localhost";
const port = window.location.port || "8000";
const defaultWebSocketUrl = `ws://${host}:${port}/asr`;
websocketInput.value = defaultWebSocketUrl;
websocketUrl = defaultWebSocketUrl;
chunkSelector.addEventListener("change", () => { chunkSelector.addEventListener("change", () => {
chunkDuration = parseInt(chunkSelector.value); chunkDuration = parseInt(chunkSelector.value);
}); });