diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-01-16 14:02:35 -0600 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-01-16 16:28:49 -0600 |
| commit | f09f971af73a1e249d5eef6ee0d7c6692d83d5c9 (patch) | |
| tree | 5b0838bae704b91dbc17edef2ef527115f0b27ea /src/views | |
| parent | 9e4d0bd3a5a8e94d227f3417658ff4a2461c8e87 (diff) | |
| download | invidious-f09f971af73a1e249d5eef6ee0d7c6692d83d5c9.tar.gz invidious-f09f971af73a1e249d5eef6ee0d7c6692d83d5c9.tar.bz2 invidious-f09f971af73a1e249d5eef6ee0d7c6692d83d5c9.zip | |
Fix audio-only for video.js
Diffstat (limited to 'src/views')
| -rw-r--r-- | src/views/watch.ecr | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/views/watch.ecr b/src/views/watch.ecr index 8a16dbca..0a5824e9 100644 --- a/src/views/watch.ecr +++ b/src/views/watch.ecr @@ -2,21 +2,23 @@ <%= video.info["title"] + " - " %> <% end %> -<video id="player" class="video-js" data-setup="{}" style="width:100%" controls> - <% if listen == "true" %> - <% adaptive_fmts.each do |fmt| %> - <% url = fmt["url"] %> - <% type = fmt["type"].to_s.split(";")[0] %> - <% if type.starts_with?("audio") %> - <source src="<%= url %>" type="<%= type %>"> - <% end %> - <% end %> - <% else %> - <% fmt_stream.each do |fmt| %> - <source src="<%= fmt["url"] %>" type="<%= fmt["type"].split(";")[0] %>"> +<% 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] %> + <% if type.starts_with?("audio") %> + <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] %>"> + <% end %> </video> +<% end %> <script> var options = { |
