如何在iPhone上播放嵌入在网页中的html5视频? [英] how to play html5 video embedded in webpage on an iPhone?

查看:501
本文介绍了如何在iPhone上播放嵌入在网页中的html5视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(对不起大图片,不确定在此降价促销中如何调整大小)

我的网页上有一些视频,使用的是html5视频标签. 在android上,该视频将保持在页面上的内联状态,使我可以在其周围包含其他内容,例如HTML中的字幕.

但是在iPhone上,当您点击播放时,视频会跳出全屏,破坏其他功能.

有什么办法可以防止这种接管吗?

在Android或普通网络上,我们没有此问题.

使用are(玉)的FYI标签

  video(width="100%" controls="controls" autoplay="true" id='videoPlayer' class='video-player')
    source(src="#{videoUrl}" type="video/mp4")

玩前

点击播放后

解决方案

虽然最初无法使用本地HTML <video>标签在iOS上的Safari中使用Apple

Before play

After click to play

解决方案

While not originally possible in Safari on iOS using the native HTML <video> tag, Apple finally added support for this a while back by adding support for specifying a playsinline attribute on video elements.

e.g. <video … playsinline />

I appreciate this question is old, but someone had down voted it and it was unanswered.

这篇关于如何在iPhone上播放嵌入在网页中的html5视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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