这是我的小提琴:http://jsfiddle.net/R9nyW/226/。如何使用html视频屏蔽输入类型范围
这是html代码:
<video id="video" width="500" autoplay="true">
<source src="http://corrupt-system.de/assets/media/sintel/sintel-trailer.m4v" type="video/mp4" />
<source src="http://corrupt-system.de/assets/media/sintel/sintel-trailer.webm" type="video/webm" /></video>
<div id="Layer"></div>
<input type="range" id="seek-bar" value="0">
的JavaScript代码:
jQuery(function ($) {
$("#video").on("timeupdate", function() {
var myVideo = $(this)[0];
var value = (100/myVideo.duration) * myVideo.currentTime;
$("#seek-bar").val(value);
/* x = "-webkit-gradient(
linear,
left top,
right top,
color-stop("+value+", '#fff'),
color-stop("+value+", '#000')
);";
$("#seek-bar").css("background-color", x);*/
});
});
我想要实现的是输入范围的左侧有一个背景颜色X且右侧是背景色Y,而视频正在播放。我如何能做到这一点,THX
尝试使用RGB改变值的数目 – Jacob
它与RGB – Chester
我说的一样,而视频播放。无静态 – Chester