Skip to content
Snippets Groups Projects
Commit 00c71891 authored by Dorian Goepp's avatar Dorian Goepp
Browse files

handle missing ROS for VideoStream

parent 16e5a62f
Branches
No related tags found
No related merge requests found
......@@ -13,12 +13,14 @@ class VideoStream extends Component {
url: hasUrl ? this.props.url : this.defaultImage
};
if (this.props.ros) {
this.props.ros.getTopics(function(infos){
if (undefined !== infos.topics.find(elem => elem === this.topic)) {
this.setState({url: 'http://localhost:8081/stream?topic=' + this.topic});
}
}.bind(this))
}
}
handleSettingsChange(event) {
this.setState({url: event.target.value})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment