Patch for video.js to prevent mousemove spam #331

merged 1 commit into from Mar 9, 2014
Commits on Mar 9, 2014
  1. @download13

    Patch for video.js to prevent mousemove spam

    download13 committed Mar 9, 2014
    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 filter 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).