1 defmodule Pleroma.Web.Metadata.PlayerView do
3 import Phoenix.HTML.Tag, only: [content_tag: 3, tag: 2]
5 def render("player.html", %{"mediaType" => type, "href" => href}) do
6 {tag_type, tag_attrs} =
8 "audio" <> _ -> {:audio, []}
9 "video" <> _ -> {:video, [loop: true]}
15 tag(:source, src: href, type: type),
16 "Your browser does not support #{type} playback."
18 [controls: true] ++ tag_attrs