diff --git a/japji/index.html b/japji/index.html
index 3c1250a..383f6f0 100644
--- a/japji/index.html
+++ b/japji/index.html
@@ -1723,7 +1723,7 @@
(def student-recordings (atom (apply vector (repeat (count data) nil))))
- (defn enable-play-button [phrase-no])
+ (defn enable-play-button! [phrase-no])
(defn record-student-sound!
[phrase-no]
@@ -1732,10 +1732,10 @@
(try
(.then (.getUserMedia (.mediaDevices js/navigator) {:audio true})
(fn [arg]
- (let [media-recorder (MediaRecorder. arg)
+ (let [media-recorder (js/MediaRecorder. arg)
audio-chunks (atom [])]
(.start media-recorder)
- (set! media-recorder onerror
+ (set! (.-onerror media-recorder)
(fn [s]
(.log js/console (str "Error while recording sound: " s))))
(.addEventListener media-recorder "dataavailable"
@@ -1747,7 +1747,7 @@
(js/console.log "data available after MediaRecorder.stop() called.")
(if (> (count @audio-chunks) 0)
(do
- ;; Store the blob in the student-sounds data structure
+ ;; Store the blob in the student-recordings data structure
(swap! student-recordings assoc phrase-no
(js/Blob. (clj->js @audio-chunks)))
(enable-play-button! phrase-no))))))))
@@ -1801,7 +1801,7 @@
(defn play-student!
[phrase-no]
- (.play (js/Audio. (.createObjectURL js/URL (@student-sounds phrase-no)))))
+ (.play (js/Audio. (.createObjectURL js/URL (@student-recordings phrase-no)))))
(defn animate-progress-bar!
[id duration]