diff app/views/tweets/_tweet.html.erb @ 154:3943833e973c

Now with video support wooow
author nanaya <me@nanaya.pro>
date Sat, 28 Jul 2018 02:01:00 +0900
parents 950849c40d42
children 522d832d8a8c
line wrap: on
line diff
--- a/app/views/tweets/_tweet.html.erb	Sat Apr 14 04:06:04 2018 +0900
+++ b/app/views/tweets/_tweet.html.erb	Sat Jul 28 02:01:00 2018 +0900
@@ -36,6 +36,8 @@
         <%= link_to "#{media.media_url_https}:orig" do %>
           <%= image_tag "#{media.media_url_https}:small", :alt => "attachment #{i + 1}" -%>
         <% end %>
+      <% elsif media.is_a? Twitter::Media::Video %>
+        <%= video_tag media.video_info.variants.map(&:url), width: '100%' %>
       <% end %>
     <% end %>
   </p>