diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-02-08 20:18:47 -0600 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-02-08 20:18:47 -0600 |
| commit | a27c556904556bcd7407a485541dd54cedd5dca0 (patch) | |
| tree | e5adda324c0cb45924b21e5b88a96963ba62a1a0 /src | |
| parent | 655a593c87edddf23d9fa92c6c9d7e6caa732957 (diff) | |
| download | invidious-a27c556904556bcd7407a485541dd54cedd5dca0.tar.gz invidious-a27c556904556bcd7407a485541dd54cedd5dca0.tar.bz2 invidious-a27c556904556bcd7407a485541dd54cedd5dca0.zip | |
Fix 500 for livestream
Diffstat (limited to 'src')
| -rw-r--r-- | src/views/watch.ecr | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/views/watch.ecr b/src/views/watch.ecr index 1f4a883f..f727c4a9 100644 --- a/src/views/watch.ecr +++ b/src/views/watch.ecr @@ -8,17 +8,17 @@ <% 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 %>"> + <source src="<%= url %>" type="<%= type %>"> <% end %> <% end %> </audio> <% 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 %> |
