                           (dom/source #js {:src (str "http://" js/window.location.hostname
                                                      ":" (config "UiAudioPort") "/hivejam")
                                            :type "audio/mpeg"}))
-               (if (= :play (:state state))
-                 (om/build button {:text "stop"
+               (if (:play cursor)
+                 (om/build button {:text "Stop"
                                    :click-chan (:stop-ch state)})
-                 (om/build button {:text "play"
+                 (om/build button {:text "Play"
                                    :click-chan (:play-ch state)}))))
     om/IDidMount
     (did-mount [_]

                      (map (partial dom/li nil) cursor))))))

(defn button [{:keys [text click-chan]} owner]
  (reify
    om/IInitState
    (init-state [_]
      {:id (new-id)})
    om/IRenderState
    (render-state [_ state]
      (dom/div #js {:id (:id state)}))
    om/IDidMount
    (did-mount [_]
      (let [node (om/get-node owner)
            b (Button. text (.getInstance FlatButtonRenderer))]
        (.render b node)
        (gevents/listen b Component.EventType.ACTION
                        #(go (>! click-chan true)))))))

(defn hive-view [{:keys [cursor save-state-ch load-state-ch]}]
  (reify

               (om/build button {:text "Load state"
                                 :click-chan load-state-ch})))))

(defn audio-view [cursor owner]
  (reify
    om/IInitState
    (init-state [_]
