2018-01-07 17:40:03 +00:00
|
|
|
<% content_for "header" do %>
|
2018-01-07 17:49:48 +00:00
|
|
|
<%= video.info["title"] + " - " %>
|
2018-01-07 17:40:03 +00:00
|
|
|
<% end %>
|
2018-01-07 02:39:24 +00:00
|
|
|
<video style="width: 100%" poster="<%= video.info.has_key?("iurlhq720") ? video.info["iurlhq720"] : video.info["iurlmq"] %>" controls>
|
2018-01-04 02:06:16 +00:00
|
|
|
<% if listen %>
|
|
|
|
<% adaptive_fmts.each do |fmt| %>
|
|
|
|
<% url = fmt["url"] %>
|
|
|
|
<% type = fmt["type"].to_s.split(";")[0] %>
|
|
|
|
<% if type.starts_with?("audio") %>
|
|
|
|
<source src="<%= url %>" type="<%= type %>">
|
|
|
|
<% end %>
|
2017-12-30 21:30:21 +00:00
|
|
|
<% end %>
|
2018-01-04 02:06:16 +00:00
|
|
|
<% else %>
|
|
|
|
<% fmt_stream.each do |fmt| %>
|
|
|
|
<source src="<%= fmt["url"] %>" type="<%= fmt["type"].split(";")[0] %>">
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2017-12-30 21:30:21 +00:00
|
|
|
</video>
|
2018-01-07 17:40:03 +00:00
|
|
|
<h1><%= video.info["title"] %> <a class="link" href="/watch?<%= query.to_s %>">
|
2018-01-04 02:06:16 +00:00
|
|
|
<i class="fa <%= listen ? "fa-video-camera" : "fa-volume-up" %>" aria-hidden="true"></i>
|
|
|
|
</a>
|
|
|
|
</h1>
|
2017-12-30 21:30:21 +00:00
|
|
|
<div class="pure-g">
|
|
|
|
<div class="pure-u-1 pure-u-md-1-5">
|
2018-01-07 02:39:24 +00:00
|
|
|
<p><i class="fa fa-eye" aria-hidden="true"></i> <%= views.to_i %></p>
|
|
|
|
<p><i class="fa fa-thumbs-up" aria-hidden="true"></i> <%= likes.to_i %></p>
|
|
|
|
<p><i class="fa fa-thumbs-down" aria-hidden="true"></i> <%= dislikes.to_i %></p>
|
|
|
|
<p>Wilson Score : <%= ci_lower_bound(likes, likes + dislikes).round(4) %></p>
|
|
|
|
<p>Rating : <%= rating.round(4) %> / 5</p>
|
2017-12-30 21:30:21 +00:00
|
|
|
<p>Engagement : <%= engagement.round(2) %>%</p>
|
2018-01-07 02:39:24 +00:00
|
|
|
<p>Earnings : <%= video.info.has_key?("allowed_ads") ? "~$" + ((views.to_f / 500).round(2)).to_s : "Unmonetized" %></p>
|
|
|
|
<p>Allowed ads : <br><%= video.info.has_key?("allowed_ads") ? video.info["allowed_ads"] : "Unmonetized" %></p>
|
2017-12-30 21:30:21 +00:00
|
|
|
</div>
|
|
|
|
<div class="pure-u-1 pure-u-md-3-5">
|
2018-01-07 18:35:13 +00:00
|
|
|
<p><a class="link" href="https://youtube.com/channel/<%= video.info["ucid"] %>"><%= video.info["author"] %></a></p>
|
2018-01-07 02:39:24 +00:00
|
|
|
<p><%= description %></p>
|
2017-12-30 21:30:21 +00:00
|
|
|
</div>
|
|
|
|
<div class="pure-u-1 pure-u-md-1-5">
|
2018-01-07 02:39:24 +00:00
|
|
|
<% related_videos_list.each do |video| %>
|
2018-01-07 17:40:03 +00:00
|
|
|
<a class="link" href="/watch?v=<%= video.id %>"><p><%= video.info["title"] %></p></a>
|
2017-12-30 21:30:21 +00:00
|
|
|
<% end %>
|
2017-11-24 04:06:43 +00:00
|
|
|
</div>
|
2018-01-07 17:50:04 +00:00
|
|
|
</div>
|
2017-11-23 07:48:55 +00:00
|
|
|
</div>
|