diff options
| author | Thomas Lange <code@nerdmind.de> | 2023-09-27 15:25:29 +0200 |
|---|---|---|
| committer | Thomas Lange <code@nerdmind.de> | 2023-09-27 15:36:40 +0200 |
| commit | 824cc1a5aa6321936357677e77b6638c96137225 (patch) | |
| tree | 6163073b80b6f80298345cd7d47f75a18d502ff0 | |
| parent | bf470704a5a3071cebb1d558efaef8542a16dde6 (diff) | |
| download | invidious-824cc1a5aa6321936357677e77b6638c96137225.tar.gz invidious-824cc1a5aa6321936357677e77b6638c96137225.tar.bz2 invidious-824cc1a5aa6321936357677e77b6638c96137225.zip | |
Don't redefine the "preload" option in player.js
If the HTML5 "<video>" element defines the "preload" attribute directly,
it isn't necessary to redefine the "preload" option in the player.js.
| -rw-r--r-- | assets/js/player.js | 4 | ||||
| -rw-r--r-- | src/invidious/views/components/player.ecr | 3 |
2 files changed, 1 insertions, 6 deletions
diff --git a/assets/js/player.js b/assets/js/player.js index 398c66f8..7c920400 100644 --- a/assets/js/player.js +++ b/assets/js/player.js @@ -34,10 +34,6 @@ if (player_data.aspect_ratio) { options.aspectRatio = player_data.aspect_ratio; } -if (player_data.preload) { - options.preload = player_data.preload -} - var embed_url = new URL(location); embed_url.searchParams.delete('v'); var short_url = location.origin + '/' + video_data.id + embed_url.search; diff --git a/src/invidious/views/components/player.ecr b/src/invidious/views/components/player.ecr index f72fd9de..5c28358b 100644 --- a/src/invidious/views/components/player.ecr +++ b/src/invidious/views/components/player.ecr @@ -74,8 +74,7 @@ "title" => video.title, "description" => HTML.escape(video.short_description), "thumbnail" => thumbnail, - "preferred_caption_found" => !preferred_captions.empty?, - "preload" => params.preload ? "auto" : "none" + "preferred_caption_found" => !preferred_captions.empty? }.to_pretty_json %> </script> |
