YouTube 播放器中的黑边 - Javascript API

Black borders in YouTube player - Javascript API

我正在使用 YouTube Player API , based on the example provided from Getting Started 添加 YouTube 视频。

黑色边框(顶部和底部)是我的问题。在 YouTube Player Parameters 上我没有找到可以解决我问题的参数。

有没有隐藏黑边的方法,不用CSS?

这是我使用的代码(我只在新 YT.Player 中添加了 playerVars):

<!--1.The <iframe> (and video player)will replace this <div> tag.-->
<div id = "player">  <  div>

 <script>
// 2. This code loads the IFrame Player API code asynchronously.
var tag = document.createElement('script');

tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);

// 3. This function creates an <iframe> (and YouTube player)
// after the API code downloads.
var player;
function onYouTubeIframeAPIReady() {
player = new YT.Player('player', {
        height : '390',
        width : '640',
        videoId : 'St_dIV8NIoc',
        //
        // here is where youtube player parameters are placed
        //
        playerVars : {
            controls : 0,
            cc_load_policy : 0,
            loop : 1,
            autoplay: 1,
            modestbranding: 0,
            rel: 0,
            showinfo: 0
        },
        events : {
            'onReady' : onPlayerReady,
            'onStateChange' : onPlayerStateChange
        }
    });
}

// 4. The API will call this function when the video player is ready.
function onPlayerReady(event) {
    event.target.playVideo();
}

// 5. The API calls this function when the player's state changes.
// The function indicates that when playing a video (state=1),
// the player should play for six seconds and then stop.
var done = false;
function onPlayerStateChange(event) {
    if (event.data == YT.PlayerState.PLAYING && !done) {
        setTimeout(stopVideo, 6000);
        done = true;
    }
}
function stopVideo() {
    player.stopVideo();
}
    </script>

该示例将 30px 添加到标准高度(对于控件)。

不显示控件时使用标准尺寸(640x360)

标准尺寸列在 https://developers.google.com/youtube/iframe_api_reference#Playback_quality