about summary refs log tree commit diff
path: root/app/views/media/player.html.haml
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2020-07-07 10:08:13 -0500
committerStarfall <us@starfall.systems>2020-07-07 10:10:33 -0500
commit147b4e7713cf5555fc4b515c7d88da49bf597f46 (patch)
tree67e33c2838eea691088e77ec4e19afb23104e77d /app/views/media/player.html.haml
parentcfd52a032aa4ee545d479b65a295e6a9e77c4f4f (diff)
parentc4e1b82caf5c932a3c19bc77726c9e3ab3d2c46a (diff)
Mastodon 3.1.5 / Merge branch 'glitch' into main
Diffstat (limited to 'app/views/media/player.html.haml')
-rw-r--r--app/views/media/player.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/media/player.html.haml b/app/views/media/player.html.haml
index 3d308ee69..1d0374897 100644
--- a/app/views/media/player.html.haml
+++ b/app/views/media/player.html.haml
@@ -11,6 +11,6 @@
     %video{ autoplay: 'autoplay', muted: 'muted', loop: 'loop' }
       %source{ src: @media_attachment.file.url(:original) }
 - elsif @media_attachment.audio?
-  = react_component :audio, src: @media_attachment.file.url(:original), poster: full_asset_url(@media_attachment.account.avatar_static_url), width: 670, height: 380, fullscreen: true, alt: @media_attachment.description, duration: @media_attachment.file.meta.dig(:original, :duration) do
+  = react_component :audio, src: @media_attachment.file.url(:original), poster: @media_attachment.thumbnail.present? ? @media_attachment.thumbnail.url : @media_attachment.account.avatar_static_url, backgroundColor: @media_attachment.file.meta.dig('colors', 'background'), foregroundColor: @media_attachment.file.meta.dig('colors', 'foreground'), accentColor: @media_attachment.file.meta.dig('colors', 'accent'), width: 670, height: 380, fullscreen: true, alt: @media_attachment.description, duration: @media_attachment.file.meta.dig(:original, :duration) do
     %audio{ controls: 'controls' }
       %source{ src: @media_attachment.file.url(:original) }