     (om/root app-view app-state
              {:target el
               :shared {:command-channel command-chan
-                       :search-channel search}})))
+                       :search-channel search}})
+    (swap! app-state assoc-in [:player :want-play] true)))
 
 (.addEventListener js/window "load" init)
 (cljs.test/run-tests)



(defn sync-transport [_ ref o n]
  (let [desired (:player n)
        actual (player-el)
        urls (queue-current-entry (:queue desired))]

    ;; find out what track we should be playing
    (let [bits (best-media-url urls)
          actual-path (.getPath (goog.Uri. (.-src actual)))]
      (when (and bits (not (= actual-path bits)))
        (set! (.-src actual) bits)))

    (when (and (.-paused actual) (:want-play desired) urls)
      (.play actual))

    (if-not (:want-play desired)
      (.pause actual))))


(defn app-view [state owner]

                      :tracks []
                      :current-track 0
                      }
              :want-play false
              :audio-el {:track-offset 0 :playing false :ready-state nil}
              }
     }))

