2017-11-30 00:12:23 +00:00
|
|
|
<title><%= video_info["title"] %> - Invidious</title>
|
2017-11-29 01:59:51 +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-04 02:06:16 +00:00
|
|
|
<h1><%= video_info["title"] %> <a href="/watch?<%= env.request.query %>">
|
|
|
|
<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">
|
|
|
|
<p><i class="fa fa-eye" aria-hidden="true"></i> <%= video_record.views %></p>
|
|
|
|
<p><i class="fa fa-thumbs-up" aria-hidden="true"></i> <%= video_record.likes %></p>
|
|
|
|
<p><i class="fa fa-thumbs-down" aria-hidden="true"></i> <%= video_record.dislikes %></p>
|
|
|
|
<p>Wilson Score : <%= ci_lower_bound(video_record.likes, video_record.likes + video_record.dislikes).round(4) %></p>
|
|
|
|
<p>Rating : <%= video_record.rating.round(4) %> / 5</p>
|
|
|
|
<!-- <p>Calculated Rating : <%= calculated_rating.round(4) %> / 5</p> -->
|
|
|
|
<p>Engagement : <%= engagement.round(2) %>%</p>
|
|
|
|
<p>Earnings : <%= video_info.has_key?("allowed_ads") ? "~$" + ((video_record.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>
|
|
|
|
</div>
|
|
|
|
<div class="pure-u-1 pure-u-md-3-5">
|
|
|
|
<p><%= video_record.description %></p>
|
|
|
|
</div>
|
|
|
|
<div class="pure-u-1 pure-u-md-1-5">
|
|
|
|
<% related_videos.each do |video| %>
|
|
|
|
<p><a href="<%= video.content %>"><%= video.content %></a></p>
|
|
|
|
<% end %>
|
2017-11-24 04:06:43 +00:00
|
|
|
</div>
|
2017-11-23 07:48:55 +00:00
|
|
|
</div>
|