mirror of
https://github.com/iv-org/invidious.git
synced 2025-11-01 21:22:02 +00:00
Pull 'player' out into seperate component
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user