gpt4 book ai didi

html - 在 Firefox 33 中无法播放 HTML5 视频

转载 作者:行者123 更新时间:2023-12-04 22:56:19 24 4
gpt4 key购买 nike

我正准备将一些旧页面更新为 HTML5,并惊讶地发现它可以在 Chrome 中运行,但不能在最新的 Firefox 中运行(v.33.1 ......也尝试过 v.32)。奇怪的是……在 Firefox 中,如果你“哄它”,它实际上会播放。如果您将视频位置 slider 移动到起点以外的某个位置(大约 5 秒),然后单击播放,一切都很好。进一步检查显示,当我单击播放时,文件指针跳到文件末尾,而我的“海报”照片完好无损,导致观看者认为他们无能为力。但是,如果您手动将指针移回文件前几秒之外的任何位置(真的!),然后单击“播放”按钮,FF 将正常播放视频的其余部分。

有时我认为,对于我们当中更有技术头脑的人来说,宇宙会解决更奇怪的问题,而上帝却在笑。

我怀疑视频文件损坏,但我所有的转换都是使用非常可靠的 ffmpeg 实用程序进行的,并使用 VLC 进行了测试。同样,它在 Chrome 上运行良好,据说它使用相同的视频格式。这是一个链接...

FF 将播放旧类型的 ogv 文件,因此,如果这是 FF 现在版本 33 出现问题的其中之一,我将不得不检测浏览器并自己使用 document.write() 编写命令。但是很高兴知道是否有更直接的解决方案。

请注意,我已尝试将 mime 类型添加到我的 HTACESS 文件中。但是,当我的浏览器直接指向本地机器上的文件时,行为是相同的,这让我怀疑这是问题所在。

http://pixyland.org/peterpan/OurWedding2a.html

这是页面代码

 <!DOCTYPE html > 

<html>
<head>
<title>Our Fairy Wonderful Wedding Day... The Arrival!!
</title>

<link rel="shortcut icon" href="/pixyland.ico" >

</head>

<body marginwidth="10" leftmargin="10" rightmargin="10" bgcolor="#33cc99" link="#333399" >



<table align="center" border="1"><tr><td align="center">
<div id='vtLocation' align="center">

<video width="640" height ="480" controls poster="Imagezz/Wedding/arIMG_2280.JPG">
<source src ="../vids/Arrival.mp4" type="video/mp4"> <!--cSafari / iOS -->
<source src ="../vids/Arrival.webm" type="video/webm"> <!-- Firefox / Opera / Chrome -->
<source src ="../vids/Arrival.ogv" type="video/ogg" > <!-- older Firefox / Opera / Chrome -->


<!-- download as last resort -->
<p>If you are unable to view the video, here are some links to download <br>
in a a few well supported video formats. You may be able to just download <br>
and play one of these files without the browser.<br><br>
<strong>Download Video:</strong>nbsp;
nbsp;<a href="../vids/Arrival.mp4">"MP4"</a>
nbsp;<a href="../vids/Arrival.webm">"WEBM"</a>
nbsp;<a href="../vids/Arrival.ogv">"Ogg"</a>
</p>

</video>
</div>
</table>



</body>
</html>

最佳答案

发现这个可能值得尝试的建议

fmpeg -i input.webm -codec copy -avoid_negative_ts 1 output.webm

https://stackoverflow.com/a/19639848/1686036

它似乎对我有帮助,尽管 FF 可能是其他“不寻常”的东西

关于html - 在 Firefox 33 中无法播放 HTML5 视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27452971/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com