Skip to content

Commit 692226f

Browse files
committed
Don't show video feed in teleop modal by default
1 parent a02cbf6 commit 692226f

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

feedingwebapp/src/Pages/Header/InfoModal.jsx

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -134,18 +134,22 @@ function InfoModal(props) {
134134
height: '100%'
135135
}}
136136
>
137-
<View
138-
style={{
139-
flex: 5,
140-
flexDirection: 'column',
141-
justifyContent: 'center',
142-
alignItems: 'center',
143-
width: '100%',
144-
height: '100%'
145-
}}
146-
>
147-
<VideoFeed topic={CAMERA_FEED_TOPIC} updateRateHz={10} webrtcURL={props.webrtcURL} />
148-
</View>
137+
{props.showVideoFeedDuringTeleop ? (
138+
<View
139+
style={{
140+
flex: 5,
141+
flexDirection: 'column',
142+
justifyContent: 'center',
143+
alignItems: 'center',
144+
width: '100%',
145+
height: '100%'
146+
}}
147+
>
148+
<VideoFeed topic={CAMERA_FEED_TOPIC} updateRateHz={10} webrtcURL={props.webrtcURL} />
149+
</View>
150+
) : (
151+
<></>
152+
)}
149153
<View
150154
style={{
151155
flex: 7,
@@ -175,7 +179,12 @@ InfoModal.propTypes = {
175179
// Callback function for when the modal is hidden
176180
onHide: PropTypes.func.isRequired,
177181
// The URL of the webrtc signalling server
178-
webrtcURL: PropTypes.string.isRequired
182+
webrtcURL: PropTypes.string.isRequired,
183+
// Whether to show the video feed when teleoperating the robot
184+
showVideoFeedDuringTeleop: PropTypes.bool.isRequired
185+
}
186+
InfoModal.defaultProps = {
187+
showVideoFeedDuringTeleop: false
179188
}
180189

181190
export default InfoModal

0 commit comments

Comments
 (0)