 
 (defn mmss [seconds]
   (let [m (quot seconds 60)
-        s (- seconds (* 60 m))]
+        s (- (Math/floor seconds) (* 60 m))]
     (str m ":" (.substr (str "000" s) -2))))
 
 

                              ">>|")
                  (dom/button #js { :onClick player-prev }
                              "|<<")
                  (dom/audio #js {:ref "player"}))))))



      (let [el (om/get-node owner)]
        ;; last arg "true" is cos audio events don't bubble
        ;; http://stackoverflow.com/questions/11291651/why-dont-audio-and-video-events-bubble
        (.addEventListener el "ended" player-next true)
        (.addEventListener el "timeupdate" player-playing true)))
    om/IRender
    (render [this]
      (let [queue (om/observe owner (player-queue))
