From a65998274fffd1334cf4d3d0f79a58e78b1b450e Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Tue, 5 Mar 2019 15:22:04 -0600 Subject: [PATCH] Defer loading videojs-share until last --- src/invidious/views/components/player.ecr | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/invidious/views/components/player.ecr b/src/invidious/views/components/player.ecr index 99f99c581..e2cfa3a1b 100644 --- a/src/invidious/views/components/player.ecr +++ b/src/invidious/views/components/player.ecr @@ -137,8 +137,6 @@ player.on('error', function(event) { } }); -player.share(shareOptions); - <% if params[:video_start] > 0 || params[:video_end] > 0 %> player.markers({ onMarkerReached: function(marker) { @@ -188,4 +186,7 @@ if (bpb) { }); } <% end %> + +// Since videojs-share can sometimes be blocked, we try to load it last +player.share(shareOptions);