mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-09 20:24:03 +00:00
Add audio-only
This commit is contained in:
@@ -1,10 +1,23 @@
|
||||
<title><%= video_info["title"] %> - Invidious</title>
|
||||
<video style="width: 100%" poster="<%= video_info.has_key?("iurlhq720") ? video_info["iurlhq720"] : video_info["iurlmq"] %>" controls>
|
||||
<% fmt_stream.each do |fmt| %>
|
||||
<source src="<%= fmt["url"] %>" type="<%= fmt["type"].split(";")[0] %>">
|
||||
<% 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 %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% fmt_stream.each do |fmt| %>
|
||||
<source src="<%= fmt["url"] %>" type="<%= fmt["type"].split(";")[0] %>">
|
||||
<% end %>
|
||||
<% end %>
|
||||
</video>
|
||||
<h1><%= video_info["title"] %></h1>
|
||||
<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>
|
||||
<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>
|
||||
|
Reference in New Issue
Block a user