Autostart+loop videos YouTube videos

前端 未结 6 1276
旧时难觅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条回答
  •  深忆病人
    2021-02-04 06:44

    Copy the YouTube Embedded code then make these amendments.

    • Change embed to v
    • insert &autoplay=1
    • insert &loop =1
    • insert &playlist = "video-id"

    This gives:

    
    

    There are so many people having trouble with this.....

    Note: This parameter has limited support in the AS3 player and in IFrame embeds, which could load either the AS3 or HTML5 player. Currently, the loop parameter only works in the AS3 player when used in conjunction with the playlist parameter. To loop a single video, set the loop parameter value to 1 and set the playlist parameter value to the same video ID already specified in the Player API URL.

提交回复
热议问题