2012-07-13 24 views

回答

1

在你的情況,所有需要的是增加'rel': 0到​​參數,就像這樣:

function onYouTubePlayerAPIReady() { 

    player = new YT.Player('player', { 

     playerVars: { 
         'autoplay': 1, 
         'controls': 1, 
         'autohide': 1, 
         'wmode': 'opaque', 
         'rel': 0 
        }, 

     videoId: 'JW5meKfy3fY', 

     events: { 'onReady': onPlayerReady } 
    }); 
} 

您可能也有興趣在可用參數的完整列表對於YouTube iframe API,在這裏找到:https://developers.google.com/youtube/player_parameters#Parameters

+0

對不起,但這是非常讚賞 – Azzam 2014-01-05 18:43:18

+0

FYI,最好的方式來顯示appre ciation是通過接受答案! = P – Skywalkar 2014-06-24 18:10:51

+0

哦,我該怎麼做? 編輯:明白了:) – Azzam 2014-06-25 23:20:28