Answer the question
In order to leave comments, you need to log in
Why does the script work in Chrome but not in safari and firefox at all?
}
var video = document.querySelectorAll("video");
for(var i=0; i<video.length; i++) {
video[i].onmousemove = function () {
this.play();
};
video[i].onmouseout = function () {
this.pause();
this.currentTime = 0;
};
}
Answer the question
In order to leave comments, you need to log in
replace onmousemove with onmouseover and it will not try to play a file that is already playing.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question