update sample html to use wss in case of https
Browse files
whisperlivekit/web/live_transcription.html
CHANGED
@@ -321,7 +321,7 @@
|
|
321 |
|
322 |
const host = window.location.hostname || "localhost";
|
323 |
const port = window.location.port || "8000";
|
324 |
-
const defaultWebSocketUrl =
|
325 |
websocketInput.value = defaultWebSocketUrl;
|
326 |
websocketUrl = defaultWebSocketUrl;
|
327 |
|
|
|
321 |
|
322 |
const host = window.location.hostname || "localhost";
|
323 |
const port = window.location.port || "8000";
|
324 |
+
const defaultWebSocketUrl = `${window.location.protocol === "https:" ? "wss" : "ws"}://${host}:${port}/asr`;
|
325 |
websocketInput.value = defaultWebSocketUrl;
|
326 |
websocketUrl = defaultWebSocketUrl;
|
327 |
|