comparison app/views/tweets/_tweet.html.erb @ 167:522d832d8a8c

Show controls for video
author nanaya <me@nanaya.pro>
date Fri, 03 Aug 2018 03:25:31 +0900
parents 3943833e973c
children 04ca6c4f11d0
comparison
equal deleted inserted replaced
166:469df6354341 167:522d832d8a8c
35 <% if media.is_a? Twitter::Media::Photo %> 35 <% if media.is_a? Twitter::Media::Photo %>
36 <%= link_to "#{media.media_url_https}:orig" do %> 36 <%= link_to "#{media.media_url_https}:orig" do %>
37 <%= image_tag "#{media.media_url_https}:small", :alt => "attachment #{i + 1}" -%> 37 <%= image_tag "#{media.media_url_https}:small", :alt => "attachment #{i + 1}" -%>
38 <% end %> 38 <% end %>
39 <% elsif media.is_a? Twitter::Media::Video %> 39 <% elsif media.is_a? Twitter::Media::Video %>
40 <%= video_tag media.video_info.variants.map(&:url), width: '100%' %> 40 <%= video_tag media.video_info.variants.map(&:url), width: '100%', controls: true %>
41 <% end %> 41 <% end %>
42 <% end %> 42 <% end %>
43 </p> 43 </p>
44 44
45 <% if tweet.quoted_status.present? %> 45 <% if tweet.quoted_status.present? %>