我绑定使用
var player;
player = new YT.Player('playerHome', {
height: '390',
width: '640',
videoId: 'deJWab2-xtc',
playerVars: {
controls: 0,
iv_load_policy: 3,
loop: 1,
modestbranding: 1,
rel: 0,
showinfo: 0,
nologo: 1,
mute: 1
},
events: {
'onReady': onPlayerReady
}
});
function onPlayerReady(event) {
player.mute();
player.playVideo();
}
我尝试了setVolume(0)
和mute()
,但在iOS上却无效。在Android和桌面浏览器上一切正常。
目前有工作方法吗?
答案 0 :(得分:0)
我认为问题是你在加载视频之前将其静音
试试这个:
function onPlayerReady(event) {
player.playVideo();
player.mute();
//setVolume(0); and this
}