【发布时间】:2014-01-03 23:42:49
【问题描述】:
我正在尝试在移动设备上自动播放iframe 中包含的视频。
应用运行良好,但用户必须点击 iFrame 内的按钮才能播放视频。
我已经尝试在iframe 中使用"autoplay=1" 参数,但它在移动设备上不起作用(在桌面上很好)。
你能帮帮我吗?
【问题讨论】:
-
这是移动设备上的功能,以保留用户带宽:
Autoplay on most mobile platforms (Android, iOS) gets blocked to avoid poor user experiences - video should only play following a user action. You can usually work around it by triggering the play() on another event (eg the onloaded event) -
@A.Wolff :谢谢,但我必须启动它。 play() 有解决方法,但这仅适用于我认为的 HTML5
-
vimeo API 不公开一个 play() 方法吗?我想您应该能够找到解决方法,但不幸的是,我无法在此方面为您提供更多帮助