Merge remote-tracking branch 'upstream/develop' into feature/openldap-support
[akkoma] / lib / pleroma / web / metadata / player_view.ex
index 68b0a3507196da8b0325b21542950e6cb8096168..e9a8cfc8dd24462a66998c5c48fa2fd9895709d7 100644 (file)
@@ -3,10 +3,10 @@ defmodule Pleroma.Web.Metadata.PlayerView do
   import Phoenix.HTML.Tag, only: [content_tag: 3, tag: 2]
 
   def render("player.html", %{"mediaType" => type, "href" => href}) do
-    tag_type =
+    {tag_type, tag_attrs} =
       case type do
-        "audio" <> _ -> :audio
-        "video" <> _ -> :video
+        "audio" <> _ -> {:audio, []}
+        "video" <> _ -> {:video, [loop: true]}
       end
 
     content_tag(
@@ -15,7 +15,7 @@ defmodule Pleroma.Web.Metadata.PlayerView do
         tag(:source, src: href, type: type),
         "Your browser does not support #{type} playback."
       ],
-      controls: true
+      [controls: true] ++ tag_attrs
     )
   end
 end