我正在使用youtube embed api将视频添加到我的网站https://developers.google.com/youtube/iframe_api_reference
var player = new YT.Player(playerEl, {
width: "450",
height: "250",
controls : 0,
showinfo : 0,
videoId: videoId,
});
问题是我不想在我的视频上显示视频信息和控件......但我无法让这个工作。有没有办法删除iframe嵌入的信息和控件?
答案 0 :(得分:2)
试试这个:
var player = new YT.Player(playerEl, {
width: "450",
height: "250",
videoId: videoId,
playerVars: {
controls: "0",
showinfo: "0"
}
});