Spaces:
Sleeping
Sleeping
Update static/app.js
Browse files- static/app.js +5 -1
static/app.js
CHANGED
|
@@ -16,10 +16,14 @@ let pingInterval;
|
|
| 16 |
// Track currently visible people (Live Presence)
|
| 17 |
let currentlyVisible = {};
|
| 18 |
// Track confirmed people for the session (Permanent)
|
| 19 |
-
|
| 20 |
|
| 21 |
const VISIBILITY_TIMEOUT_MS = 8000;
|
| 22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
function logToTerminal(msg) {
|
| 24 |
const div = document.createElement('div');
|
| 25 |
const time = new Date().toISOString().split('T')[1].slice(0, 12);
|
|
|
|
| 16 |
// Track currently visible people (Live Presence)
|
| 17 |
let currentlyVisible = {};
|
| 18 |
// Track confirmed people for the session (Permanent)
|
| 19 |
+
const confirmedPeople = new Set();
|
| 20 |
|
| 21 |
const VISIBILITY_TIMEOUT_MS = 8000;
|
| 22 |
|
| 23 |
+
// Calculate dynamic WebSocket URL for Hugging Face Spaces
|
| 24 |
+
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
| 25 |
+
const wsUrl = `${protocol}//${window.location.host}/ws`;
|
| 26 |
+
|
| 27 |
function logToTerminal(msg) {
|
| 28 |
const div = document.createElement('div');
|
| 29 |
const time = new Date().toISOString().split('T')[1].slice(0, 12);
|