diff --git a/frontend/src/components/App.tsx b/frontend/src/components/App.tsx index 3a2b061..3d87587 100644 --- a/frontend/src/components/App.tsx +++ b/frontend/src/components/App.tsx @@ -180,7 +180,9 @@ const App: React.FC = () => { } }, [fetchPlaylist, fetchNowPlaying, fetchFavorites]); - useWebSocket('/api/events', { + const wsUrl = `${window.location.protocol === 'https:' ? 'wss:' : 'ws:'}//${window.location.host}/api/events`; + console.log('Connecting to WebSocket at', wsUrl); + useWebSocket(wsUrl, { onOpen: () => { console.log('WebSocket connected'); },