Autostart+loop videos YouTube videos

前端 未结 6 1281
旧时难觅i
旧时难觅i 2021-02-04 06:27

YouTube recently discarded the old \"embed\" code and replaced it with iframe code.

In the new iframe code I found the way to loop+autostart videos on my website, thanks

6条回答
  •  梦毁少年i
    2021-02-04 07:04

    I came here with a similar question. That question has been solved, heres how i did it. Where you link the source, just get the original embed code, then replace the part that says embed with v. ex:

    www.youtube.com/v/lG5aSZBAuPs
    

    (embed was originally here, now its a v)

    Now add these attributes (or whatever the name for them would be) to the end of that embed link:

    1. &autoplay=1
    2. &loop=1
    3. &playlist=lG5aSZBAuPs <-- this is the video id shown at the end of the embed source link.

    so at the end the link should look like so:

    
    

提交回复
热议问题