File tree Expand file tree Collapse file tree 1 file changed +22
-13
lines changed Expand file tree Collapse file tree 1 file changed +22
-13
lines changed Original file line number Diff line number Diff line change @@ -134,18 +134,22 @@ function InfoModal(props) {
134
134
height : '100%'
135
135
} }
136
136
>
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
+ ) }
149
153
< View
150
154
style = { {
151
155
flex : 7 ,
@@ -175,7 +179,12 @@ InfoModal.propTypes = {
175
179
// Callback function for when the modal is hidden
176
180
onHide : PropTypes . func . isRequired ,
177
181
// 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
179
188
}
180
189
181
190
export default InfoModal
You can’t perform that action at this time.
0 commit comments