diff --git a/frontend/src/config.ts b/frontend/src/config.ts index ee57455..dc93403 100644 --- a/frontend/src/config.ts +++ b/frontend/src/config.ts @@ -4,8 +4,9 @@ export const API_URL = 'https://argus-api.hsrn.nyu.edu'; export const RECORDINGS_STATIC_PATH = '/recordings/static/'; export const TEST_USER = 'test'; export const TEST_PASS = 'test'; -export const WS_API_URL = API_URL.replace('https://', 'wss://'); +// export const WS_API_URL = API_URL.replace('https://', 'wss://'); // export const WS_API_URL = API_URL.replace('http://', 'ws://'); +export const WS_API_URL = API_URL.replace('https://', 'wss://').replace('http://', 'ws://'); export const REASONING_CHECK_STREAM = 'reasoning:check_status'; export const REASONING_ENTITIES_STREAM = 'reasoning:entities'; export const DETIC_IMAGE_STREAM = 'detic:image:misc'; diff --git a/frontend/src/tabs/LiveDataView/LiveDataView.tsx b/frontend/src/tabs/LiveDataView/LiveDataView.tsx index 7d38654..b6d86d5 100644 --- a/frontend/src/tabs/LiveDataView/LiveDataView.tsx +++ b/frontend/src/tabs/LiveDataView/LiveDataView.tsx @@ -2,7 +2,7 @@ import React, { useEffect } from 'react'; import { Alert, Box, Button, Paper, Typography, Chip } from '@mui/material'; import { useToken } from '../../api/TokenContext'; import { Login } from '../../tabs/RecipesCollectionView/RecipesView'; -import { REASONING_CHECK_STREAM, CLIP_ACTION_STEPS_STREAM, DETIC_IMAGE_STREAM, MAIN_STREAM, TEST_PASS, TEST_USER } from '../../config'; +import { REASONING_CHECK_STREAM, CLIP_ACTION_STEPS_STREAM, DETIC_IMAGE_STREAM, MAIN_STREAM, TEST_PASS, TEST_USER, API_URL, WS_API_URL } from '../../config'; import LoadingButton from '@mui/lab/LoadingButton'; @@ -15,7 +15,7 @@ import { ImageView } from './components/StreamDataView/ImageView'; import { ClipOutputsLiveView } from './components/StreamDataView/PerceptionOutputsView'; import { ReasoningOutputsView } from './components/StreamDataView/ReasoningOutputsView'; import DebuggingDataView from '../DebuggingDataView/DebuggingDataView'; - +import { log } from 'console'; const RecordingControls = () => { const { recordingId, recordingData, recordingDataError, startError, stopError, finishedRecording, startRecording, stopRecording } = useRecordingControls(); @@ -60,6 +60,11 @@ const RecordingControls = () => { const parseTime = (tstr) => new Date(Date.parse(tstr + ' GMT')).toLocaleTimeString() function LiveVideo() { + console.log("API_URL"); + console.log(API_URL); + console.log("WS_API_URL"); + console.log(WS_API_URL); + return (