平板电脑支持html吗,HTML5视频无法在平板电脑上播放(HTML5 video not playing on tablets)...

HTML5视频无法在平板电脑上播放(HTML5 video not playing on tablets)

下午好,我早些时候发布了一些内容,但仍然需要帮助。 我有一个Nexus 7和一个IPad2。 我有一个编码为H.264的mp4文件。 我使用下面的标签:

Your browser does not support the video tag.

当我进入iPad2上的网页时,它会显示一个播放按钮,其中有一条线穿过它。 当我在我的nexus 7上访问网页时,我得到了播放控件,但是当我点击播放时,暂停按钮出现但没有播放。 这只是一个黑屏。 我在PC或Mac上打开相同的网站,视频就在那里,播放得很好而没有问题。 作为对我的设备的测试,我去了W3Schools上的视频标签示例并加载示例。 这个例子在我的iPad2和nexus 7上播放得很好。

我完全不知道我的视频无法在平板电脑上播放,但在PC和Mac上运行良好。 如果有人知道请帮助我。 先谢谢你。

Good afternoon, I posted something on this earlier but am still in need of help. I have a Nexus 7 and an IPad2. I have an mp4 file that is encoded H.264. I use the folowing tag:

Your browser does not support the video tag.

When I go to the webpage on my iPad2 it shows a play button with a line crossing it out. When I go to teh webpage on my nexus 7 I get the play controls but when I hit play the pause button appears but nothing plays. It's just a black screen. I open the same website on a PC or Mac and the video is there and plays just fine without issue. As a test on my device I went to the example that is on W3Schools for the video tag and load the example. the example plays just fine on my iPad2 and nexus 7.

I am at a complete loss as to my video will not play on the tablet but works fine on the PC and Mac. If anyone knows please help me. Thank you in advance.

原文:https://stackoverflow.com/questions/14464173

更新时间:2020-02-23 07:02

最满意答案

问题似乎是设置为网络上某个文件夹的防火墙设置。 一旦我将代码放在该文件夹之外,一切正常。

The issue seems to be a firewall setting set to a certain folder on my network. Once I placed the code outside of that folder everything worked fine.

相关问答

我最近看到的最详细的清单是在这里: http://www.longtailvideo.com/html5/ The most detailed list I have seen recently is over here: http://www.longtailvideo.com/html5/

您可以: 添加标记的controls属性。 在此解决方案中,您无法控制将在UI中显示的按钮。 不使用control属性,而是编写自己的UI(按钮,输入类型范围,ext)来调用JS api - play(),pause()方法(以及更多) 使用或不使用control属性,编写您自己的事件侦听器,这些侦听器将侦听事件并执行您想要的任何操作(例如,在特定时间搜索视频) 资源和示例: w3schools - 视频/音频 html5寻求 使用HTML5音频和视频 输入类型 You can: Add the

...

嗯...事实证明问题发生是因为我使用.htaccess来密码保护目录。 有趣的是,除了Safari之外的所有浏览器都允许访问视频文件。 感谢那些帮助过的人! Well...it turns out that the issue occurred because I was using .htaccess to password protect the directory. Interestingly, all browsers except for Safari would allow acces

...

你为什么不使用HTML5视频属性? 没有必要使用JavaScript。

自动播放会在加载后立即播放视频,并且海报会在加载视频时将其分配给视频。 你应该在这里阅读更多: http : //www.w3schoo

...

这可能是相关的。 http://code.google.com/p/chromium/issues/detail?id=72985 虽然该错误适用于包含许多视频的网页,但我发现Chrome 9在包含一个视频的网页上具有相同的行为。 Chrome 10 beta没有出现这种行为,删除preload属性似乎也解决了这个问题。 This may be related. http://code.google.com/p/chromium/issues/detail?id=72985 Although th

...

关于是否可以这样做,评论中有很多讨论,所以我将在这里提供一个特定于媒体源的答案。 Media Source Extensions (MSE)是一种新的(尚未广泛支持的)工具集,可帮助您控制HTML5视频的缓冲和流式传输。 从W3C摘要: 此规范扩展了HTMLMediaElement以允许JavaScript生成用于回放的媒体流。 允许JavaScript生成流有助于各种用例,如自适应流和时移实时流。 我将特别推荐您使用SourceBuffer对象 ,该对象包含有关如何处理音频和视频轨道缓冲的信息。

...

即使此问题已被标记为已回答,但您可能会感兴趣的是您和其他任何人在此遇到的问题: 指定播放范围 。 它是Media Fragment API的一部分,目前用于最新版本的Firefox,Chrome和Safari 6+。 Even though this question has already been marked as answered, here's something that may interest you and anyone else who stumbles across here

...

这应该工作: 使用带有autoplay属性的1个视频标签创建一个空的html页面 然后使用JavaScript创建一个包含您要播放的视频的所有路径的数组 将函数附加到视频标记的“已结束”事件 函数内部生成一个随机索引Math.floor(Math.random() * clipPaths.length); 使用生成的索引从数组中获取随机路径 将路径设置为视频标记的“src”属性 你只需要将所有路径放在clipPaths数组中......

...

您可以使用webkitEnterFullscreen()方法。 var vid;

function init() {

vid = document.getElementById("myVideo");

vid.addEventListener("loadedmetadata", addFullscreenButton, false);

}

function addFullscreenButton() {

i

...

问题似乎是设置为网络上某个文件夹的防火墙设置。 一旦我将代码放在该文件夹之外,一切正常。 The issue seems to be a firewall setting set to a certain folder on my network. Once I placed the code outside of that folder everything worked fine.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值