how to loop two videos using youtube iframe code

后端 未结 2 1025
深忆病人
深忆病人 2021-01-28 18:39

I use the following code in my web page to successfully autoplay and loop one video. Now, I\'d like to add another video, essentially looping two videos. So, after one video is

2条回答
  •  旧巷少年郎
    2021-01-28 19:20

    A similar question was asked before about iframe and looping. I found this from another question on stackoverflow, a youtube link has a special ? parameter: autoplay. For example in this link

    src="https://www.youtube.com/embed/M7lc1UVf-VE ?&autoplay=1& loop=1&rel=0&showinfo=0&color=white&iv_load_policy=3&playlist=M7lc1UVf-VE"

    Try adding ?&autoplay=1& considering that worked for someone else.


    I found it from here

    Update

    If you wanna play multiple videos you can do it simply and embed a playlist. You can find how to do so in this article at the Embed a playlist section. Hope this helps.

提交回复
热议问题