diff options
author | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-11-23 22:48:07 +0100 |
---|---|---|
committer | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-11-23 22:48:07 +0100 |
commit | 2871575c66fb8e194af2ade87d279bc55579bf71 (patch) | |
tree | 45ab450ebda4b9792996e3632b731b3499825dac | |
parent | b8ae5778830d6e2e899f8fdfbe7743186f50e809 (diff) |
feat: don't unmount bg player but only hide it
-rw-r--r-- | src/frontend/tubo/player/views.cljs | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/frontend/tubo/player/views.cljs b/src/frontend/tubo/player/views.cljs index 075f675..022d882 100644 --- a/src/frontend/tubo/player/views.cljs +++ b/src/frontend/tubo/player/views.cljs @@ -151,20 +151,19 @@ "),url(" (:thumbnail-url stream) ")")] - (when show-player? - [:div.sticky.absolute.left-0.bottom-0.z-10.p-3.transition-all.ease-in.relative - {:style - {:visibility (when show-queue? "hidden") - :opacity (if show-queue? 0 1) - :background-image bg-image - :background-size "cover" - :background-position "center" - :background-repeat "no-repeat"}} - [:div.flex.items-center - [player/audio-player stream !player] - [stream-metadata stream] - [main-controls !player color] - [extra-controls !player stream color]]]))) + [:div.sticky.absolute.left-0.bottom-0.z-10.p-3.transition-all.ease-in.relative + {:style + {:visibility (when (or (not show-player?) show-queue?) "hidden") + :opacity (if (or (not show-player?) show-queue?) 0 1) + :background-image bg-image + :background-size "cover" + :background-position "center" + :background-repeat "no-repeat"}} + [:div.flex.items-center + [player/audio-player stream !player] + [stream-metadata stream] + [main-controls !player color] + [extra-controls !player stream color]]])) (defn main-player [] |