1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-25 02:42:10 +02:00
Signed-off-by: Janez Troha <janez.troha@gmail.com>
This commit is contained in:
Janez Troha 2010-06-01 16:04:23 +08:00 committed by sheff
parent 4ee7ccfde4
commit 1ff9abfc10

View File

@ -66,8 +66,8 @@ var VideoJS = Class.extend({
// Listen for clicks on the button
this.fullscreenControl.addEventListener("click", this.onFullscreenControlClick.context(this), false);
// Listen for the mouse over the video. Used to reveal the controller.
this.video.addEventListener("mouseover", this.onVideoMouseOver.context(this), false);
// Listen for the mouse move the video. Used to reveal the controller.
this.video.addEventListener("mousemove", this.onVideoMouseMove.context(this), false);
// Listen for the mouse moving out of the video. Used to hide the controller.
this.video.addEventListener("mouseout", this.onVideoMouseOut.context(this), false);
// Have to add the mouseout to the controller too or it may not hide.
@ -303,8 +303,10 @@ var VideoJS = Class.extend({
}
},
onVideoMouseOver: function(event){
onVideoMouseMove: function(event){
this.showController();
clearInterval(this.mouseMoveTimeout);
this.mouseMoveTimeout = setTimeout(function(){this.hideController(); }.context(this), 4000);
},
onVideoMouseOut: function(event){