From 9dbae6e8a120fc18fdc007503375b53f6b061b8f Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 16 Feb 2018 07:22:20 +0100 Subject: 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 --- app/views/media/player.html.haml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 app/views/media/player.html.haml (limited to 'app/views/media/player.html.haml') diff --git a/app/views/media/player.html.haml b/app/views/media/player.html.haml new file mode 100644 index 000000000..ea868b3f6 --- /dev/null +++ b/app/views/media/player.html.haml @@ -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 } -- cgit