From a5280af18822a6572ba6dd11f6482985325662ea Mon Sep 17 00:00:00 2001 From: Ludo Date: Mon, 13 Nov 2023 12:50:38 +0100 Subject: [PATCH] Update WebSocket URL to use dynamic hostname and port --- server/public/js/stream.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/public/js/stream.js b/server/public/js/stream.js index 6933a0c..1ecd7ac 100644 --- a/server/public/js/stream.js +++ b/server/public/js/stream.js @@ -1,7 +1,7 @@ const canvas = document.getElementById('videoCanvas'); const context = canvas.getContext('2d'); -const ws = new WebSocket('ws://localhost:3000'); +const ws = new WebSocket(`ws://${window.location.hostname}:${window.location.port}`); ws.binaryType = 'blob'; let python_connected = false;