mirror of https://framagit.org/tykayn/mastodon.git
7 lines
578 B
Plaintext
7 lines
578 B
Plaintext
- if @media_attachment.audio?
|
|
%audio{ preload: 'auto', controls: 'controls' }
|
|
%source{ src: @media_attachment.file.url(:original), type: @media_attachment.file_content_type }
|
|
- else
|
|
%video{ poster: @media_attachment.file.url(:small), preload: 'auto', autoplay: 'autoplay', muted: 'muted', loop: 'loop', controls: 'controls', style: "width: #{@media_attachment.file.meta.dig('original', 'width')}px; height: #{@media_attachment.file.meta.dig('original', 'height')}px" }
|
|
%source{ src: @media_attachment.file.url(:original), type: @media_attachment.file_content_type }
|