所以,我尝试使用 iframe 嵌入“我的”Youtube channel 的最新视频,使用代码:
<iframe width="400" height="300" src="http://www.youtube.com/embed?max-results=1&controls=0&showinfo=0&rel=0&listType=user_uploads&list=CHANNEL NAME" frameborder="0" allowfullscreen></iframe> .
虽然当我将 CHANNEL NAME
替换为我的 channel 名称 (UCy3amHVg1fS_GBF8NSNlTAA
) 时,它会抛出错误 - 但是,当我将其替换为 pewdiepie 之类的内容时,它会抛出错误
它工作得很好。
最佳答案
它仅适用于 channel 用户名,不适用于 channel ID。但您可以使用 JavaScript 使其工作。
https://stackoverflow.com/a/45342740/11599531
谢谢:)
关于html - iframe 不会嵌入 YouTube channel 的最新视频 (HTML),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58700689/