mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Fix 500 for livestream
This commit is contained in:
parent
655a593c87
commit
a27c556904
1 changed files with 4 additions and 4 deletions
|
@ -8,8 +8,8 @@
|
|||
<% if listen == "true" %>
|
||||
<audio id="player" class="video-js" data-setup="{}" style="width:100%;" controls>
|
||||
<% adaptive_fmts.each do |fmt| %>
|
||||
<% url = fmt["url"] %>
|
||||
<% type = fmt["type"].to_s.split(";")[0] %>
|
||||
<% url = fmt["url"]? %>
|
||||
<% type = fmt["type"]? ? fmt["type"].to_s.split(";")[0] : "" %>
|
||||
<% if type.starts_with?("audio") %>
|
||||
<source src="<%= url %>" type="<%= type %>">
|
||||
<% end %>
|
||||
|
@ -18,7 +18,7 @@
|
|||
<% else %>
|
||||
<video id="player" class="video-js" data-setup="{}" style="width:100%;" controls>
|
||||
<% 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 %>
|
||||
</video>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in a new issue