mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-26 16:52:12 +05:30
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.
This commit is contained in:
parent
bf470704a5
commit
824cc1a5aa
@ -34,10 +34,6 @@ if (player_data.aspect_ratio) {
|
|||||||
options.aspectRatio = 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);
|
var embed_url = new URL(location);
|
||||||
embed_url.searchParams.delete('v');
|
embed_url.searchParams.delete('v');
|
||||||
var short_url = location.origin + '/' + video_data.id + embed_url.search;
|
var short_url = location.origin + '/' + video_data.id + embed_url.search;
|
||||||
|
@ -74,8 +74,7 @@
|
|||||||
"title" => video.title,
|
"title" => video.title,
|
||||||
"description" => HTML.escape(video.short_description),
|
"description" => HTML.escape(video.short_description),
|
||||||
"thumbnail" => thumbnail,
|
"thumbnail" => thumbnail,
|
||||||
"preferred_caption_found" => !preferred_captions.empty?,
|
"preferred_caption_found" => !preferred_captions.empty?
|
||||||
"preload" => params.preload ? "auto" : "none"
|
|
||||||
}.to_pretty_json
|
}.to_pretty_json
|
||||||
%>
|
%>
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user