From 9b79e35d5280e7c7586e44d18930267f7e5237b6 Mon Sep 17 00:00:00 2001 From: Andrew Zhao Date: Wed, 24 Feb 2021 01:02:55 -0500 Subject: do not preload captions --- src/invidious/views/components/player.ecr | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/invidious/views/components/player.ecr b/src/invidious/views/components/player.ecr index a898a41f..cff3e60a 100644 --- a/src/invidious/views/components/player.ecr +++ b/src/invidious/views/components/player.ecr @@ -24,9 +24,9 @@ <% end %> <% end %> - <% preferred_captions.each_with_index do |caption, i| %> + <% preferred_captions.each do |caption| %> " - label="<%= caption.name.simpleText %>" <% if i == 0 %>default<% end %>> + label="<%= caption.name.simpleText %>"> <% end %> <% captions.each do |caption| %> @@ -42,7 +42,8 @@ "aspect_ratio" => aspect_ratio, "title" => video.title, "description" => HTML.escape(video.short_description), - "thumbnail" => thumbnail + "thumbnail" => thumbnail, + "preferred_caption_found" => !preferred_captions.empty? }.to_pretty_json %> -- cgit v1.2.3