mirror of https://github.com/iv-org/invidious.git
Clarify listen param and update icon
This commit is contained in:
parent
da97dfad8e
commit
6adbcd050c
|
@ -147,9 +147,13 @@ end
|
||||||
|
|
||||||
get "/watch" do |env|
|
get "/watch" do |env|
|
||||||
id = env.params.query["v"]
|
id = env.params.query["v"]
|
||||||
listen = env.params.query["listen"]? || "false"
|
|
||||||
|
|
||||||
|
if env.params.query["listen"]? && env.params.query["listen"] == "true"
|
||||||
|
listen = true
|
||||||
env.params.query.delete_all("listen")
|
env.params.query.delete_all("listen")
|
||||||
|
else
|
||||||
|
listen = false
|
||||||
|
end
|
||||||
|
|
||||||
client = get_client(pool)
|
client = get_client(pool)
|
||||||
begin
|
begin
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<title><%= video.title %> - Invidious</title>
|
<title><%= video.title %> - Invidious</title>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if listen == "true" %>
|
<% if listen %>
|
||||||
<audio id="player" class="video-js" data-setup="{}" style="width:100%;" controls>
|
<audio id="player" class="video-js" data-setup="{}" style="width:100%;" controls>
|
||||||
<% adaptive_fmts.each do |fmt| %>
|
<% adaptive_fmts.each do |fmt| %>
|
||||||
<% url = fmt["url"]? %>
|
<% url = fmt["url"]? %>
|
||||||
|
@ -76,9 +76,9 @@ var player = videojs('player', options, function() {
|
||||||
|
|
||||||
<h1>
|
<h1>
|
||||||
<%= video.info["title"] %>
|
<%= video.info["title"] %>
|
||||||
<% if listen == "true" %>
|
<% if listen %>
|
||||||
<a class="link" href="/watch?<%= env.params.query %>">
|
<a class="link" href="/watch?<%= env.params.query %>">
|
||||||
<i class="fa fa-video-camera" aria-hidden="true"></i>
|
<i class="fa fa-video" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
<% else %>
|
<% else %>
|
||||||
<a class="link" href="/watch?<%= env.params.query %>&listen=true">
|
<a class="link" href="/watch?<%= env.params.query %>&listen=true">
|
||||||
|
|
Loading…
Reference in New Issue