aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Ángel Moreno <mail@migalmoreno.com>2024-06-04 22:04:44 +0200
committerMiguel Ángel Moreno <mail@migalmoreno.com>2024-06-04 22:04:44 +0200
commitc455734da7ee4d143634234e3bab6121f944f498 (patch)
treee015d5dab21407c134ab27ae98e465d80d3f31ea
parentcc6399b17fe651a2f5159a9bb6500df61dc413a7 (diff)
feat: amend player styles and available streams
-rw-r--r--src/frontend/tubo/components/player.cljs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/frontend/tubo/components/player.cljs b/src/frontend/tubo/components/player.cljs
index 5344d76..11c0674 100644
--- a/src/frontend/tubo/components/player.cljs
+++ b/src/frontend/tubo/components/player.cljs
@@ -9,7 +9,7 @@
(defn get-player-sources
[available-streams]
- (map (fn [{:keys [content]}] {:src content :type "video/mp4"}) available-streams))
+ (map (fn [{:keys [content]}] {:src content :type "video/mp4"}) (reverse available-streams)))
(defn video-player
[stream !player]
@@ -24,7 +24,8 @@
{:title name
:src (get-player-sources (into video-streams audio-streams))
:poster thumbnail-url
- :class "h-[500px] lg:h-[600px] w-full xl:w-3/5 overflow-x-hidden"
+ :class "w-full xl:w-3/5 overflow-hidden"
+ :playsInline true
:ref #(reset! !player %)
:loop (when show-main-player? (= @(rf/subscribe [:loop-playback]) :stream))
:onSeeked (when show-main-player?
@@ -56,7 +57,7 @@
(r/create-class
{:component-will-unmount #(rf/dispatch [:background-player/ready false])
:reagent-render
- (fn [{:keys [name video-streams audio-streams thumbnail-url]} !player]
+ (fn [{:keys [name audio-streams thumbnail-url]} !player]
[:> MediaPlayer
{:title name
:class "invisible fixed"