代码语言:javascript复制
function notdrag() {
var video = document.getElementById("myvideo");
var last = 0;
video.ontimeupdate = function() {
var current = video.currentTime;
if (current - last > 2) {
video.currentTime = last;
} else {
last = current;
}
}
}