Browse Source

fix(frontend): Use stream types from options on source change

Miguel Ángel Moreno 1 year ago
parent
commit
416ae53388
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/frontend/tubo/components/player.cljs

+ 1 - 1
src/frontend/tubo/components/player.cljs

@@ -59,7 +59,7 @@
       (fn [this [_ prev-argv prev-more]]
         (when (and @!player (not= prev-more (first (r/children this))))
           (.src @!player (apply array (map #(js-obj "type" % "src" (first (r/children this)))
-                                           ["video/mp4" "video/webm"])))
+                                           (map #(get % "type") (get options "sources")))))
           (.ready @!player #(.play @!player))))
       :component-will-unmount
       (fn [_]