Skip to content

Invidious is an alternative front-end to YouTube

Use <audio> tag for audio only

Omar Rothe6bc5bb35dba
diff --git a/src/invidious/views/components/player.ecr b/src/invidious/views/components/player.ecr
index 51f7182a..76fb3dc1 100644
--- a/src/invidious/views/components/player.ecr
+++ b/src/invidious/views/components/player.ecr
@@ -1,4 +1,4 @@
-<video style="width:100%" playsinline poster="<%= thumbnail %>" title="<%= HTML.escape(video.title) %>"
+<<% if params[:listen]%>audio<% else %>video<% end %> style="width:100%" playsinline poster="<%= thumbnail %>" title="<%= HTML.escape(video.title) %>"
id="player" class="video-js"
onmouseenter='this["title"]=""'
<% if params[:autoplay] %>autoplay<% end %>
@@ -34,7 +34,7 @@
label="<%= caption.name.simpleText %>">
<% end %>
<% end %>
-</video>
+</<% if params[:listen]%>audio<% else %>video<% end %>>
<script>
var options = {