Youtube iframe api onReady 未在 Ipad 上触发?
我读到您无法自动播放视频,但我注意到 iPad 上没有调用我的 onReady 函数。它适用于所有其他浏览器。这是另一个已知问题吗?
这是我的加载代码:
player = new YT.Player('videoDiv', {
events: {
'onReady': onPlayerReady,
'onStateChange': youtubePlayer.onPlayerStateChange
}
});
onPlayerReady 有一个警报,该警报不会显示在 iPad 上,但会显示在所有其他浏览器上。另外,玩家变量似乎不是我所期望的。我得到一个 [Object object] 但执行player.playVideo 或player.queVideoById() 都会导致错误。这些也是已知的错误吗?
iPad 上有什么功能?
谢谢!
I've read that you cannot autoplay videos, but I'm noticing that my onReady function is not being called on iPad. It works on all other browsers. Is this another know issues?
Here's my loading code:
player = new YT.Player('videoDiv', {
events: {
'onReady': onPlayerReady,
'onStateChange': youtubePlayer.onPlayerStateChange
}
});
onPlayerReady has an alert which does not show up on iPad, it does on all other broswers. Also it seems the player variable is not what I'm expecting. I get an [Object object] but doing player.playVideo or player.queVideoById() both cause errors. Are these also known bugs?
What does work on iPad?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个老错误,现在应该修复。一旦调用 onReady 事件,您期望的播放器变量将仅具有 playVideo 和cueVideoById 等函数。
This is an old bug and it should be fixed at this time. The player variable that you're expecting will only have functions like playVideo and cueVideoById once the onReady event is called.