Skip to content

Commit

Permalink
Update WebSocket URL to use dynamic hostname and
Browse files Browse the repository at this point in the history
port
  • Loading branch information
infinitel8p committed Nov 13, 2023
1 parent 96a4b19 commit a5280af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/public/js/stream.js
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit a5280af

Please sign in to comment.