mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-29 00:47:24 +00:00
Fix 500 for livestream
This commit is contained in:
parent
655a593c87
commit
a27c556904
@ -8,8 +8,8 @@
|
|||||||
<% if listen == "true" %>
|
<% if listen == "true" %>
|
||||||
<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"]? %>
|
||||||
<% type = fmt["type"].to_s.split(";")[0] %>
|
<% type = fmt["type"]? ? fmt["type"].to_s.split(";")[0] : "" %>
|
||||||
<% if type.starts_with?("audio") %>
|
<% if type.starts_with?("audio") %>
|
||||||
<source src="<%= url %>" type="<%= type %>">
|
<source src="<%= url %>" type="<%= type %>">
|
||||||
<% end %>
|
<% end %>
|
||||||
@ -18,7 +18,7 @@
|
|||||||
<% else %>
|
<% else %>
|
||||||
<video id="player" class="video-js" data-setup="{}" style="width:100%;" controls>
|
<video id="player" class="video-js" data-setup="{}" style="width:100%;" controls>
|
||||||
<% fmt_stream.each do |fmt| %>
|
<% fmt_stream.each do |fmt| %>
|
||||||
<source src="<%= fmt["url"] %>" type="<%= fmt["type"].split(";")[0] %>">
|
<source src="<%= fmt["url"]? %>" type="<%= fmt["type"]? ? fmt["type"].to_s.split(";")[0] : "" %>">
|
||||||
<% end %>
|
<% end %>
|
||||||
</video>
|
</video>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
Loading…
Reference in New Issue
Block a user