Get Multiple Embedded Youtube Videos to Play Automatically in Sequence

前端 未结 6 2020
遇见更好的自我
遇见更好的自我 2021-02-02 03:19

Is there any simple way to have multiple embedded YouTube videos on a page and have them start playing as soon as the page is opened and when the first one finished have the sec

6条回答
  •  生来不讨喜
    2021-02-02 04:11

    Using the Youtube IFrame API, you can do this easily.

    The only part you need to configure here is the array of youtube IDs. You can retrieve those from the part after the /v/ in the URL (If need be, you can modify the javascript to load URLs instead of IDs. I just like this way better.

提交回复
热议问题