www: properly set image hostname
authorErik Andresen <erik@vontaene.de>
Sun, 17 May 2020 10:33:12 +0000 (12:33 +0200)
committerErik Andresen <erik@vontaene.de>
Sun, 17 May 2020 10:33:12 +0000 (12:33 +0200)
www/assets/javascripts/application.js
www/index.html

index 7a87c12..1a61324 100644 (file)
@@ -240,6 +240,7 @@ function init() {
        });
 
        $("input[type='number']").spinner();
+       $("#usb_cam").attr("src", "http://"+robothostname+":8080/stream?topic=/camera/color/image_raw");
 }
 
 Vue.component('input-value', {
index db7e48d..15e2aed 100644 (file)
@@ -22,7 +22,7 @@
                <script src="assets/javascripts/vue.js"></script>
                <script src="assets/javascripts/application.js"></script>
                <script type="text/javascript">
-                       robothostname="wildthumper"
+                       const robothostname="wildthumper"
                </script>
 
                <title>Wild Thumper control</title>
                                        </div>
                                </div>
                                <div id="image" class="tab-pane" role="tabpanel">
-                                       <img id="usb_cam" src="http://"+robothostname+":8080/stream?topic=/usb_cam/image_raw" style="transform:rotate(-90deg); transform-origin: 60% 60%;"></img>
+                                       <img id="usb_cam" src=""></img>
                                </div>
                        </div>
                </div>