简体   繁体   English

Mozilla Firefox中的错误。

[英]Error In Mozilla Firefox.

I write HTML/JS code for HTML5 video player and have a error in Firefox 27.0.1 version, In Ubuntu/Windows Chrome in works, in IE11 it works. 我为HTML5视频播放器编写了HTML / JS代码,并且在Firefox 27.0.1版本中出现错误,在Ubuntu / Windows Chrome浏览器中有效,在IE11中运行。

HTML HTML

<div id="newprogressBar" style="border:1px solid #aaa; color:#fff; width:295px; height:20px;"><span id="newprogress" style="background-color:#ff0000; height:20px; display:inline-block;"></span></div>

JS in HTML HTML中的JS

var video = document.getElementById("videoPlayer"), (HTML5 <video *.mp4>)
newprogressBar = document.getElementById("newprogressBar");
newprogress = document.getElementById("newprogress");

Event function in JS JS中的事件函数

newprogressBar.addEventListener('click', function(event) {
width = parseFloat(newprogressBar.style.width);
var x = event.offsetX / width;  
video.currentTime = Math.round(x * video.duration);
}, false);  

I have an error on this line in Firefox 我在Firefox的这一行有一个错误

video.currentTime = Math.round(x * video.duration);

Error: 错误:

TypeError: Value being assigned to HTMLMediaElement.currentTime is not a finite floating-point value.

Check for .webm video file within video tag. 检查video标签内的.webm视频文件。 Firefox on linux (also maybe on other OS) doesn't play .mp4 files. Linux(也可能是其他操作系统)上的Firefox无法播放.mp4文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 新的硒Web驱动程序和Firefox错误。 - Error with new selenium web driver and firefox. 参考错误-Mozilla Firefox - Reference error - Mozilla Firefox Mozilla Firefox中的javascript错误 - javascript error in Mozilla Firefox Mozilla Firefox中的未定义错误 - Undefined error in Mozilla Firefox 某些Javascript功能和标记在Chrome中不起作用,但在Mozilla Firefox中却可以正常工作。 帮助我吗? - Some Javascript Function and Tag Not Working In Chrome,but Its Work Good In Mozilla Firefox. Help Me Out Of These? 此代码在 Internet Explorer 中正常工作,但在 Mozilla firefox 中不能正常工作。 有人可以帮忙吗 - this code works properly in internet explorer but not in mozilla firefox. can someone help 'PERSISTENT' 变量存在于 Microsoft Edge 的 window object 中,但不存在于 Mozilla Firefox 中。为什么? - 'PERSISTENT' variable present in window object of Microsoft Edge, But not in Mozilla Firefox. why? Firefox中未定义事件”。 - Event is not defined” in firefox. 解构错误对象在 Chrome 中有效,但在 Firefox 中无效。 可以做什么? - Destructuring error objects works in Chrome but not Firefox. What can be done? 为什么Mozilla Firefox抛出语法错误? - Why is Mozilla Firefox throwing a syntax error?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM