Save video metadata and improve video OpenGraph tags (#6481)
* Save metadata from video attachments, put correct dimensions into OG tags * Add twitter:player for videos * Fix code style and test
This commit is contained in:
parent
1122579216
commit
9dbae6e8a1
11 changed files with 151 additions and 44 deletions
2
app/views/media/player.html.haml
Normal file
2
app/views/media/player.html.haml
Normal file
|
@ -0,0 +1,2 @@
|
|||
%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 }
|
Loading…
Add table
Add a link
Reference in a new issue