                            (set! (.-width params) (int fit-w))
                            (set! (.-height params) (int fit-h))
                            (on-ui
+                               (toast (format "Fit (%d x %d) to (%d x %d)"
+                                              width height
+                                              (int fit-w) (int fit-h)))
                                (doto surface
                                  (.setLayoutParams params)
                                  (.requestLayout)))
                            (when (and from to)
+                             (log/i "darknet" "stream-video" from to width height)
                              (server/stream-video from to width height)))))]
         (doto (.getHolder surface)
           (.setType SurfaceHolder/SURFACE_TYPE_PUSH_BUFFERS)

     (reify
       MediaPlayer$OnCompletionListener
       (onCompletion [this mp]
         (swap-view! activity (layout activity idle-screen)))))
    (.start))
  view)


                               "saveLocally" (save-locally! this instruction)
                               "viewRemote" (sv (view-remote this instruction))
                               "viewLocal" (sv (view-local this instruction))
                               "info" (sv (layout this [:text-view {:text
                                                                    (let [out (java.io.StringWriter.)]
                                                                      (pprint sizes out)
                                                                      (.toString out))}]))
                               "stop" (sv (layout this (idle-screen Color/GREEN)))
                               :default))))]
      (helper/fullscreen! this)
      (helper/keep-screen-on! this)
      (helper/landscape! this)
      (let [client (atom nil)]
        (letfn [(new-client []
                  (log/i "darknet" "new client called")
                  (reset! client
                          (websocket/connect!
                           (:ws-url config)
