about summary refs log tree commit diff
path: root/app/views/media/player.html.haml
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-07-05 22:55:09 +0200
committerGitHub <noreply@github.com>2020-07-05 22:55:09 +0200
commit94e09d309cb068ea92919767e40e655260ac43cb (patch)
tree8c41900d4f4c8a94cb5a2feee1af2080ae2dec15 /app/views/media/player.html.haml
parent9b3677d5097fb50f90a6abdce9d722e81d2db469 (diff)
parent69cddc3909924b5a2ce02f85932fb41f88faf0db (diff)
Merge pull request #1371 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
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) }