Skip to content

Commit 62dbc38

Browse files
Sam AdamsSam Adams
authored andcommitted
add auto-play failure logging
1 parent 1c7efdb commit 62dbc38

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

‎src/practaid/db.cljs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
:re-pressed.core/keyup
103103
,]))
104104

105+
;; TODO
105106
(s/def ::db any? #_(s/and
106107
::db-keys
107108
(fn [m]

‎src/practaid/events.cljs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,9 @@
438438
:getOAuthToken (fn [callback]
439439
(rf/dispatch [::player-requests-access-token callback]))
440440
:volume 0.5}))
441+
_ (.addListener player "autoplay_failed"
442+
;; TODO move me
443+
(fn [] (js/console.error "Autoplay is not allowed by the browser autoplay rules.")))
441444

442445
_ (.addListener player "ready"
443446
(fn [player]

0 commit comments

Comments
 (0)