aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/frontend/tubo/components/audio_player.cljs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/frontend/tubo/components/audio_player.cljs b/src/frontend/tubo/components/audio_player.cljs
index b8a0e57..40f05b1 100644
--- a/src/frontend/tubo/components/audio_player.cljs
+++ b/src/frontend/tubo/components/audio_player.cljs
@@ -18,9 +18,10 @@
{:display-name "AudioPlayer"
:component-did-mount
(fn [this]
+ (set! (.-onended (rdom/dom-node this))
+ #(rf/dispatch [::events/change-media-queue-pos (+ media-queue-pos 1)]))
(when stream
- (set! (.-src (rdom/dom-node this)) stream)
- (set! (.-onended @!player) #(rf/dispatch [::events/change-media-queue-pos (+ media-queue-pos 1)]))))
+ (set! (.-src (rdom/dom-node this)) stream)))
:reagent-render
(fn [!player]
(let [!elapsed-time @(rf/subscribe [:elapsed-time])