mirror of
https://gitea.invidious.io/iv-org/invidious.git
synced 2024-08-15 00:53:41 +00:00
59 lines
No EOL
2.3 KiB
Text
59 lines
No EOL
2.3 KiB
Text
<% content_for "header" do %>
|
|
<%= video.info["title"] + " - " %>
|
|
<% end %>
|
|
|
|
<video style="width: 100%" poster="<%= player_response["videoDetails"]["thumbnail"]["thumbnails"][-1]["url"] %>" controls>
|
|
<% if listen == "true" %>
|
|
<% 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 %>
|
|
<% end %>
|
|
<% else %>
|
|
<% fmt_stream.each do |fmt| %>
|
|
<source src="<%= fmt["url"] %>" type="<%= fmt["type"].split(";")[0] %>">
|
|
<% end %>
|
|
<% end %>
|
|
</video>
|
|
<h1>
|
|
<%= video.info["title"] %>
|
|
<% if listen == "true" %>
|
|
<a class="link" href="/watch?v=<%= id %>">
|
|
<i class="fa fa-video-camera" aria-hidden="true"></i>
|
|
</a>
|
|
<% else %>
|
|
<a class="link" href="/watch?v=<%= id %>&listen=true">
|
|
<i class="fa fa-volume-up" aria-hidden="true"></i>
|
|
</a>
|
|
<% end %>
|
|
</h1>
|
|
<div class="pure-g">
|
|
<div class="pure-u-1 pure-u-md-1-5">
|
|
<p><i class="fa fa-eye" aria-hidden="true"></i> <%= views %></p>
|
|
<p><i class="fa fa-thumbs-up" aria-hidden="true"></i> <%= likes %></p>
|
|
<p><i class="fa fa-thumbs-down" aria-hidden="true"></i> <%= dislikes %></p>
|
|
<p id="Wilson">Wilson Score : <%= ci_lower_bound(likes, likes + dislikes).round(4) %></p>
|
|
<p id="Rating">Rating : <%= rating.round(4) %> / 5</p>
|
|
<p id="Engagement">Engagement : <%= engagement.round(2) %>%</p>
|
|
</div>
|
|
<div class="pure-u-1 pure-u-md-3-5">
|
|
<p><a class="link" href="https://youtube.com/channel/<%= video.info["ucid"] %>"><%= video.info["author"] %></a></p>
|
|
<p id="Description"><%= description %></p>
|
|
<% rvs.each do |rv| %>
|
|
<% rv.each do |value| %>
|
|
<p style="word-break: break-all"><%= value[0] %> => <%= value[1] %></p>
|
|
<% end %>
|
|
<br>
|
|
<% end %>
|
|
</div>
|
|
<div class="pure-u-1 pure-u-md-1-5">
|
|
<% rvs.each do |rv| %>
|
|
<% if rv.has_key?("id") %>
|
|
<p><a class="link" href="/watch?v=<%= rv["id"] %>"><%= rv["title"] %></a></p>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div> |