2022-10-26 22:42:29 +11:00
|
|
|
- if status.ordered_media_attachments.first.video?
|
2023-09-06 04:05:58 +10:00
|
|
|
= render_video_component(status, visible: false)
|
2022-10-26 22:42:29 +11:00
|
|
|
- elsif status.ordered_media_attachments.first.audio?
|
|
|
|
- audio = status.ordered_media_attachments.first
|
2023-05-11 20:41:55 +10:00
|
|
|
= react_component :audio, src: audio.file.url(:original), height: 110, alt: audio.description, lang: status.language, duration: audio.file.meta.dig(:original, :duration)
|
2022-10-26 22:42:29 +11:00
|
|
|
- else
|
2023-05-11 20:41:55 +10:00
|
|
|
= react_component :media_gallery, height: 343, sensitive: status.sensitive?, visible: false, lang: status.language, media: status.ordered_media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }
|