gpt4 book ai didi

html - YouTube iframe用户列表自动播放

转载 作者:行者123 更新时间:2023-12-03 06:12:54 25 4
gpt4 key购买 nike

我如何autoplayloop来自用户的最后一个视频?

<iframe width="720" height="480" src="http://www.youtube.com/embed?max-results=1&showinfo=0&rel=0&controls=0&autoplay=1&listType=user_uploads&list=DchRussia" frameborder="0" allowfullscreen></iframe>

最佳答案

根据YouTube API的介绍,您需要获取用户视频的列表并存储最后一个视频的ID,并将其放在playlist = VIDEO_ID的后面

这样您的iframe可能会像这样

<iframe width="720" height="480" src="https://www.youtube.com/embed/LAST_VIDEO_ID?rel=0&showinfo=0&rel=0&controls=0&autoplay=1&loop=1&playlist=LAST_VIDEO_ID" frameborder="0" allowfullscreen></iframe>

关于html - YouTube iframe用户列表自动播放,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48721393/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com