mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Pull 'player' out into seperate component
This commit is contained in:
parent
debe5cbea9
commit
ce0e4babad
7 changed files with 207 additions and 338 deletions
|
@ -200,7 +200,7 @@ get "/watch" do |env|
|
|||
end
|
||||
subscriptions ||= [] of String
|
||||
|
||||
autoplay, video_loop, video_start, video_end, listen, raw, quality, autoplay = process_video_params(env.params.query, preferences)
|
||||
autoplay, video_loop, video_start, video_end, listen, raw, quality, controls = process_video_params(env.params.query, preferences)
|
||||
if listen
|
||||
env.params.query.delete_all("listen")
|
||||
end
|
||||
|
@ -226,6 +226,7 @@ get "/watch" do |env|
|
|||
captions = captions - preferred_captions
|
||||
end
|
||||
preferred_captions ||= [] of Caption
|
||||
aspect_ratio = "16:9"
|
||||
|
||||
video.description = fill_links(video.description, "https", "www.youtube.com")
|
||||
video.description = add_alt_links(video.description)
|
||||
|
@ -316,7 +317,21 @@ get "/embed/:id" do |env|
|
|||
next env.redirect url
|
||||
end
|
||||
|
||||
autoplay, video_loop, video_start, video_end, listen, raw, quality, autoplay, controls = process_video_params(env.params.query, nil)
|
||||
autoplay, video_loop, video_start, video_end, listen, raw, quality, controls = process_video_params(env.params.query, nil)
|
||||
preferred_captions = [] of Caption
|
||||
preferences = Preferences.from_json({
|
||||
"video_loop" => video_loop,
|
||||
"autoplay" => autoplay,
|
||||
"speed" => 1.0,
|
||||
"quality" => quality,
|
||||
"volume" => 100,
|
||||
"max_results" => 0,
|
||||
"sort" => "",
|
||||
"latest_only" => false,
|
||||
"unseen_only" => false,
|
||||
"dark_mode" => false,
|
||||
}.to_json)
|
||||
aspect_ratio = nil
|
||||
|
||||
begin
|
||||
video = get_video(id, PG_DB)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue