mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-22 21:06:01 +01:00
Fix video player not being displayed in reports interface (#26801)
This commit is contained in:
parent
b749de766f
commit
ea7de25de0
2 changed files with 2 additions and 2 deletions
|
@ -14,6 +14,7 @@ module MediaComponentHelper
|
|||
blurhash: video.blurhash,
|
||||
frameRate: meta.dig('original', 'frame_rate'),
|
||||
inline: true,
|
||||
aspectRatio: "#{meta.dig('original', 'width')} / #{meta.dig('original', 'height')}",
|
||||
media: [
|
||||
serialize_media_attachment(video),
|
||||
].as_json,
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
- if status.ordered_media_attachments.first.video?
|
||||
- video = status.ordered_media_attachments.first
|
||||
= react_component :video, src: video.file.url(:original), preview: video.file.url(:small), frameRate: video.file.meta.dig('original', 'frame_rate'), blurhash: video.blurhash, sensitive: status.sensitive?, visible: false, width: 610, height: 343, inline: true, alt: video.description, lang: status.language, media: [ActiveModelSerializers::SerializableResource.new(video, serializer: REST::MediaAttachmentSerializer)].as_json
|
||||
= render_video_component(status, visible: false)
|
||||
- elsif status.ordered_media_attachments.first.audio?
|
||||
- audio = status.ordered_media_attachments.first
|
||||
= react_component :audio, src: audio.file.url(:original), height: 110, alt: audio.description, lang: status.language, duration: audio.file.meta.dig(:original, :duration)
|
||||
|
|
Loading…
Reference in a new issue