Skip to content

Commit 9e1630f

Browse files
committed
Built jPlayer code. Updated changelog.
1 parent 2ff7df4 commit 9e1630f

File tree

3 files changed

+31
-9
lines changed

3 files changed

+31
-9
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4-
## 2.8.3 - 2014-11-20
4+
## 2.8.3 - 2014-11-20 TBD
55

66
### Added
77
- Bug fix: Merged Pull Request to [Return good ratio in Flash players when file loaded but no total length](https://github.com/happyworm/jPlayer/pull/185) by [Afterster](https://github.com/Afterster).
8+
- Bug fix: Merged Pull Request to [fix for wrong mousemove event on Chrome browser](https://github.com/happyworm/jPlayer/pull/217) by [HobieCat](https://github.com/HobieCat).
89

910

1011
## 2.8.2 - 2014-11-19

dist/jplayer/jquery.jplayer.js

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,7 @@
704704
// domNode: undefined
705705
// htmlDlyCmdId: undefined
706706
// autohideId: undefined
707+
// mouse: undefined
707708
// cmdsIgnored
708709
},
709710
solution: { // Static Object: Defines the solutions built in jPlayer.
@@ -2583,13 +2584,31 @@
25832584
event = "mousemove.jPlayer",
25842585
namespace = ".jPlayerAutohide",
25852586
eventType = event + namespace,
2586-
handler = function() {
2587-
self.css.jq.gui.fadeIn(self.options.autohide.fadeIn, function() {
2588-
clearTimeout(self.internal.autohideId);
2589-
self.internal.autohideId = setTimeout( function() {
2590-
self.css.jq.gui.fadeOut(self.options.autohide.fadeOut);
2591-
}, self.options.autohide.hold);
2592-
});
2587+
handler = function(event) {
2588+
var moved = false,
2589+
deltaX, deltaY;
2590+
if(typeof self.internal.mouse !== "undefined") {
2591+
//get the change from last position to this position
2592+
deltaX = self.internal.mouse.x - event.pageX;
2593+
deltaY = self.internal.mouse.y - event.pageY;
2594+
moved = (Math.floor(deltaX) > 0) || (Math.floor(deltaY)>0);
2595+
} else {
2596+
moved = true;
2597+
}
2598+
// store current position for next method execution
2599+
self.internal.mouse = {
2600+
x : event.pageX,
2601+
y : event.pageY
2602+
};
2603+
// if mouse has been actually moved, do the gui fadeIn/fadeOut
2604+
if (moved) {
2605+
self.css.jq.gui.fadeIn(self.options.autohide.fadeIn, function() {
2606+
clearTimeout(self.internal.autohideId);
2607+
self.internal.autohideId = setTimeout( function() {
2608+
self.css.jq.gui.fadeOut(self.options.autohide.fadeOut);
2609+
}, self.options.autohide.hold);
2610+
});
2611+
}
25932612
};
25942613

25952614
if(this.css.jq.gui.length) {
@@ -2600,6 +2619,8 @@
26002619

26012620
// Removes the fadeOut operation from the fadeIn callback.
26022621
clearTimeout(this.internal.autohideId);
2622+
// undefine mouse
2623+
delete this.internal.mouse;
26032624

26042625
this.element.unbind(namespace);
26052626
this.css.jq.gui.unbind(namespace);

0 commit comments

Comments
 (0)