带有 js API 和 iPhone 的视频播放器 [英] video players with js API and iPhones
问题描述
我希望在点击我网站上的特定元素时开始播放视频.我测试了 vimeo player 和 youtube 视频播放器 它在桌面上运行良好,但当我在 iPhone 上测试时却没有.
I would like video start to play when use clicks on the specific element on my site. I tested vimeo player and youtube video player It works great on the desktop, but when I tested on the iPhone it doesn't.
我知道 Apple 不允许自动播放.来自 Apple 文档警告:为了防止用户自行承担费用通过蜂窝网络进行未经请求的下载,无法在 iOS 上的 Safari 中自动播放嵌入式媒体 - 用户始终启动播放."
I know that Apple doesn't allow autoplay. From Apple documentation "Warning: To prevent unsolicited downloads over cellular networks at the user’s expense, embedded media cannot be played automatically in Safari on iOS — the user always initiates playback."
我的问题是当用户点击网站上的某个 html 元素时 - 是否可以视为用户开始播放?您是如何在 iPhone 上解决此类问题的?
My question is when user click on some html element on the site - can it be considered as initiation of playback by user? How did you solve such problems on the iPhones?
推荐答案
其实这个限制是从Apple方面强加的进一步回答请看答案
Actually this restriction is imposed from Apple side further answer Please see the answer
这篇关于带有 js API 和 iPhone 的视频播放器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!