2022-10-26 07:42:29 -04:00
|
|
|
- if status.ordered_media_attachments.first.video?
|
2023-09-05 14:05:58 -04:00
|
|
|
= render_video_component(status, visible: false)
|
2022-10-26 07:42:29 -04:00
|
|
|
- elsif status.ordered_media_attachments.first.audio?
|
|
|
|
- audio = status.ordered_media_attachments.first
|
2023-05-11 06:41:55 -04: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 07:42:29 -04:00
|
|
|
- else
|
2023-05-11 06:41:55 -04: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 }
|