0

我使用 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 embed 的 info nad 控件?

4

1 回答 1

2

Try this:

  var player = new YT.Player(playerEl, {
        width: "450",
        height: "250",
        videoId: videoId,
        playerVars: {
        controls: "0",
        showinfo: "0"
        }
    });
于 2013-09-16T13:38:01.823 回答