summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/invidious/views/components/player.ecr11
-rw-r--r--src/invidious/views/components/player_sources.ecr14
-rw-r--r--src/invidious/views/licenses.ecr48
3 files changed, 24 insertions, 49 deletions
diff --git a/src/invidious/views/components/player.ecr b/src/invidious/views/components/player.ecr
index bdcf999e..3ab44899 100644
--- a/src/invidious/views/components/player.ecr
+++ b/src/invidious/views/components/player.ecr
@@ -13,18 +13,19 @@
<% audio_streams.each_with_index do |fmt, i| %>
<source src="/latest_version?id=<%= video.id %>&itag=<%= fmt["itag"] %><% if params[:local] %>&local=true<% end %>" type='<%= fmt["type"] %>' label="<%= fmt["bitrate"] %>k" selected="<%= i == 0 ? true : false %>">
<% end %>
- <% else %>
+ <% else %>
<% if params[:quality] == "dash" %>
<source src="/api/manifest/dash/id/<%= video.id %>?local=true" type='application/dash+xml' label="dash">
<% end %>
+
<% fmt_stream.each_with_index do |fmt, i| %>
<% if params[:quality] %>
- <source src="/latest_version?id=<%= video.id %>&itag=<%= fmt["itag"] %><% if params[:local] %>&local=true<% end %>" type='<%= fmt["type"] %>' label="<%= fmt["label"] %>" selected="<%= params[:quality] == fmt["label"].split(" - ")[0] %>">
+ <source src="/latest_version?id=<%= video.id %>&itag=<%= fmt["itag"] %><% if params[:local] %>&local=true<% end %>" type='<%= fmt["type"] %>' label="<%= fmt["label"] %>" selected="<%= params[:quality] == fmt["label"].split(" - ")[0] %>">
<% else %>
- <source src="/latest_version?id=<%= video.id %>&itag=<%= fmt["itag"] %><% if params[:local] %>&local=true<% end %>" type='<%= fmt["type"] %>' label="<%= fmt["label"] %>" selected="<%= i == 0 ? true : false %>">
+ <source src="/latest_version?id=<%= video.id %>&itag=<%= fmt["itag"] %><% if params[:local] %>&local=true<% end %>" type='<%= fmt["type"] %>' label="<%= fmt["label"] %>" selected="<%= i == 0 ? true : false %>">
<% end %>
<% end %>
- <% end %>
+ <% end %>
<% preferred_captions.each_with_index do |caption, i| %>
<track kind="captions" src="/api/v1/captions/<%= video.id %>?label=<%= caption.name.simpleText %>&hl=<%= env.get("preferences").as(Preferences).locale %>"
@@ -210,6 +211,8 @@ if (bpb) {
}
<% end %>
+player.httpSourceSelector();
+
// Since videojs-share can sometimes be blocked, we try to load it last
player.share(shareOptions);
</script>
diff --git a/src/invidious/views/components/player_sources.ecr b/src/invidious/views/components/player_sources.ecr
index aed606af..37fac6b1 100644
--- a/src/invidious/views/components/player_sources.ecr
+++ b/src/invidious/views/components/player_sources.ecr
@@ -1,15 +1,15 @@
<link rel="stylesheet" href="/css/video-js.min.css">
-<link rel="stylesheet" href="/css/quality-selector.css">
+<link rel="stylesheet" href="/css/videojs-http-source-selector.css">
<link rel="stylesheet" href="/css/videojs.markers.min.css">
<link rel="stylesheet" href="/css/videojs-share.css">
<script src="/js/video.min.js"></script>
+<script src="/js/videojs-contrib-quality-levels.min.js"></script>
+<script src="/js/videojs-http-source-selector.min.js"></script>
<script src="/js/videojs.hotkeys.min.js"></script>
-<script src="/js/silvermine-videojs-quality-selector.min.js"></script>
<script src="/js/videojs-markers.min.js"></script>
<script src="/js/videojs-share.min.js"></script>
-<script src="/js/videojs-http-streaming.min.js"></script>
-<% if params[:quality] == "dash" %>
-<script src="/js/dash.mediaplayer.min.js"></script>
-<script src="/js/videojs-dash.min.js"></script>
-<script src="/js/videojs-contrib-quality-levels.min.js"></script>
+
+<% if params[:quality] != "dash" %>
+<link rel="stylesheet" href="/css/quality-selector.css">
+<script src="/js/silvermine-videojs-quality-selector.min.js"></script>
<% end %> \ No newline at end of file
diff --git a/src/invidious/views/licenses.ecr b/src/invidious/views/licenses.ecr
index dda42ea8..07486d2c 100644
--- a/src/invidious/views/licenses.ecr
+++ b/src/invidious/views/licenses.ecr
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<html>
+<html lang="en-US">
<head>
<meta charset="utf-8">
@@ -11,20 +11,6 @@
<table id="jslicense-labels1">
<tr>
<td>
- <a href="/js/dash.mediaplayer.min.js">dash.mediaplayer.min.js</a>
- </td>
-
- <td>
- <a href="http://directory.fsf.org/wiki/License:BSD_3Clause">Modified-BSD</a>
- </td>
-
- <td>
- <a href="https://github.com/Dash-Industry-Forum/dash.js"><%= translate(locale, "source") %></a>
- </td>
- </tr>
-
- <tr>
- <td>
<a href="/js/silvermine-videojs-quality-selector.min.js">silvermine-videojs-quality-selector.min.js</a>
</td>
@@ -39,20 +25,6 @@
<tr>
<td>
- <a href="/js/video.min.js">video.min.js</a>
- </td>
-
- <td>
- <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache-2.0-only</a>
- </td>
-
- <td>
- <a href="https://github.com/videojs/video.js"><%= translate(locale, "source") %></a>
- </td>
- </tr>
-
- <tr>
- <td>
<a href="/js/videojs-contrib-quality-levels.min.js">videojs-contrib-quality-levels.min.js</a>
</td>
@@ -67,7 +39,7 @@
<tr>
<td>
- <a href="/js/videojs-dash.min.js">videojs-dash.min.js</a>
+ <a href="/js/videojs.hotkeys.min.js">videojs.hotkeys.min.js</a>
</td>
<td>
@@ -75,21 +47,21 @@
</td>
<td>
- <a href="https://github.com/videojs/videojs-contrib-dash"><%= translate(locale, "source") %></a>
+ <a href="https://github.com/ctd1500/videojs-hotkeys"><%= translate(locale, "source") %></a>
</td>
</tr>
<tr>
<td>
- <a href="/js/videojs-http-streaming.min.js">videojs-http-streaming.min.js</a>
+ <a href="/js/videojs-http-source-selector.min.js">videojs-http-source-selector.min.js</a>
</td>
<td>
- <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache-2.0-only</a>
+ <a href="http://www.jclark.com/xml/copying.txt">Expat</a>
</td>
-
+
<td>
- <a href="https://github.com/videojs/http-streaming"><%= translate(locale, "source") %></a>
+ <a href="https://github.com/jfujita/videojs-http-source-selector"><%= translate(locale, "source") %></a>
</td>
</tr>
@@ -117,13 +89,13 @@
</td>
<td>
- <a href="https://github.com/omarroth/videojs-share/tree/add-email"><%= translate(locale, "source") %></a>
+ <a href="https://github.com/mkhazov/videojs-share"><%= translate(locale, "source") %></a>
</td>
</tr>
<tr>
<td>
- <a href="/js/videojs.hotkeys.min.js">videojs.hotkeys.min.js</a>
+ <a href="/js/video.min.js">video.min.js</a>
</td>
<td>
@@ -131,7 +103,7 @@
</td>
<td>
- <a href="https://github.com/ctd1500/videojs-hotkeys"><%= translate(locale, "source") %></a>
+ <a href="https://github.com/videojs/video.js"><%= translate(locale, "source") %></a>
</td>
</tr>