          {:response-format :raw
           :handler #(dispatch player [:asciicast-response %])
           :error-handler #(dispatch player [:bad-response %])})
-    (assoc player :loading true)))
+    (show-spinner player)))
 
 (defn asciicast-loaded?
   "Returns truthy value indicating whether asciicast is loaded."


(defn dispatch [player event]
  (put! (:event-ch player) event))

(defn elapsed-time-since
  "Returns wall time (in seconds) elapsed since then."

(defn handle-bad-response [player resp]
  (print "error fetching asciicast file:")
  (prn resp)
  (hide-spinner player))

(defn handle-stream-connected
  "Hides loading indicator. Called when stream connects."
  [player]
  (hide-spinner player))

(defn handle-stream-disconnected
  "Shows loading indicator. Called when stream disconnects."
  [player]
  (show-spinner player))

(defn handle-update-state
  "Applies given function (with args) to player."
