Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F21968236
player_view.ex
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
706 B
Referenced Files
None
Subscribers
None
player_view.ex
View Options
# Pleroma: A lightweight social networking server
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule
Pleroma.Web.Metadata.PlayerView
do
use
Pleroma.Web
,
:view
import
Phoenix.HTML.Tag
,
only
:
[
content_tag
:
3
,
tag
:
2
]
def
render
(
"player.html"
,
%{
"mediaType"
=>
type
,
"href"
=>
href
})
do
{
tag_type
,
tag_attrs
}
=
case
type
do
"audio"
<>
_
->
{
:audio
,
[]}
"video"
<>
_
->
{
:video
,
[
loop
:
true
]}
end
content_tag
(
tag_type
,
[
tag
(
:source
,
src
:
href
,
type
:
type
),
"Your browser does not support
#{
type
}
playback."
],
[
controls
:
true
]
++
tag_attrs
)
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Sun, Dec 28, 3:24 AM (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
798848
Default Alt Text
player_view.ex (706 B)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment