mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Merge pull request #8 from omarroth/embed-options
Add 'autoplay', 'controls', 'loop' to embedded player options
This commit is contained in:
commit
e87c6186e7
2 changed files with 13 additions and 1 deletions
|
@ -400,6 +400,15 @@ get "/embed/:id" do |env|
|
|||
end
|
||||
listen ||= false
|
||||
|
||||
autoplay = env.params.query["autoplay"]?.try &.to_i
|
||||
autoplay ||= 0
|
||||
|
||||
controls = env.params.query["controls"]?.try &.to_i
|
||||
controls ||= 1
|
||||
|
||||
video_loop = env.params.query["loop"]?.try &.to_i
|
||||
video_loop ||= 0
|
||||
|
||||
client = make_client(YT_URL)
|
||||
begin
|
||||
video = get_video(id, client, PG_DB)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue