diff --git a/frontend/src/components/Contexts/MediaStreamContext.tsx b/frontend/src/components/Contexts/MediaStreamContext.tsx index 8d835745b..a7d31ce07 100644 --- a/frontend/src/components/Contexts/MediaStreamContext.tsx +++ b/frontend/src/components/Contexts/MediaStreamContext.tsx @@ -61,12 +61,11 @@ export const MediaStreamProvider: FC = ({ children }) => { ) { addTrackToConnection(track.mediaStreamTrack, config.robotId) } - if (room.state == ConnectionState.Disconnected) { + if (room.state === ConnectionState.Disconnected) { room.connect(config.url, config.token) .then(() => console.log(JSON.stringify(room.state))) - .catch((error) => console.log('Error connecting to LiveKit room')) + .catch((error) => console.warn('Error connecting to LiveKit Room, may already be connected:', error)) } - console.log(JSON.stringify(room.numParticipants)) } const createMediaConnection = async (config: MediaStreamConfig) => { diff --git a/frontend/src/components/Pages/MissionPage/VideoStream/VideoPlayerSimpleStream.tsx b/frontend/src/components/Pages/MissionPage/VideoStream/VideoPlayerSimpleStream.tsx index 3c9f56170..43763ac3d 100644 --- a/frontend/src/components/Pages/MissionPage/VideoStream/VideoPlayerSimpleStream.tsx +++ b/frontend/src/components/Pages/MissionPage/VideoStream/VideoPlayerSimpleStream.tsx @@ -6,6 +6,7 @@ interface IVideoPlayerProps { export const VideoPlayerSimpleStream = ({ videoStream, videoStreamName }: IVideoPlayerProps) => (