Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Patch for video.js to prevent mousemove spam #331
On certain platforms (including node-webkit on Windows7 64-bit it seems) mousemove events are spammed whether or not the mouse has actually moved. This prevents the video player UI from being hidden since it always thinks the user is moving the mouse.
This is a patch for video.js that filters out the false mousemove events. I've already sent it as a PR to the video.js people, but until they make a decision this is a stopgap measure.
I'm not sure what causes it. Someone on StackExchange said that Webkit firing phantom mousemove events might have something to do with preventing a machine going into standby. The odd thing is that it only happens when the cursor is positioned over certain content. For example, events are not fired if the cursor is positioned over the #header element when selecting a movie, but almost anywhere else will result in a constant stream of mousemoves.
The point is, this seems to fix it for now. Ideally, it should be fixed in Webkit (assuming that's where the problem is from).