I'm using this little bit of jQuery to scrub back & forth through a video when the cursor moves on the x axis.
var mouseX;
$(document).mousemove( function moveFunc(e) {
mouseX = e.clientX;
var timV = $("#deko_vid").get(0).duration;
var valV = (timV*mouseX/$(document).width());
$("#deko_vid").get(0).currentTime = valV;
});
But I've run into a few issues:
-Works as expected in Safari, but lags considerably in Chrome (haven't tested IE/Edge). I looked for questions that were similar to mine, and found this, but I'm unsure about how best to move forward. Do I need to create a div that covers the document and bind .mousemove() to that? Find a different solution? Create a tween using greensock?
Any advice, ideas on how to move forward, constructive criticism is much appreciated!