我无法自动播放vimeo视频(手机) [英] I can't autoplay vimeo video (mobile)

查看:221
本文介绍了我无法自动播放vimeo视频(手机)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试 autoplay 移动设备上 iframe 中包含的视频。

I'm trying to autoplay a video included in a iframe on mobile devices.

该应用效果很好,但用户必须点击iFrame内的按钮才能播放视频。

The app works well, but the user must click on the button inside the iFrame to play the video.

我已尝试过使用 iframe 中的autoplay = 1参数,但它没有在移动设备上显示(在桌面上) ...

I already tried to use the "autoplay=1" parameter in the iframe but it didn't word on mobile (on desktop well)...

你能帮助我吗?

谢谢

推荐答案

正如@ A.Wolff所说, autoplay 已被设计禁用以保留带宽。

As @A.Wolff remarks, autoplay is disabled by design to preserve bandwidth.

例如,可以欺骗iOS认为用户点击了播放按钮(谷歌,如果你想知道如何)。

It's, for instance, possible to "trick" iOS into thinking that the user clicked the play button (Google it, if you want to know how).

然而,Vimeo必须实现这一点,因为你将无法从外部来源操作 iframe 的内容。

However, Vimeo would have to implement this since you won't be able to manipulate the contents of an iframe from an external source.

结论:您无法在移动设备上自动播放嵌入的Vimeo视频。

Conclusion: You can't autoplay an embeded Vimeo video on mobile devices.

(好奇的是,我通过Safari中的远程调试对嵌入式播放器的来源进行了一些挖掘,并且无法找到一种方法来播放视频而无需点击播放按钮)

(For the curious, I did some digging in the source of the embed player via remote debugging in Safari and wasn't able to find a way to get the video to play without tapping the play button)

这篇关于我无法自动播放vimeo视频(手机)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆