1
0
mirror of https://github.com/videojs/video.js.git synced 2025-02-10 12:08:14 +02:00

fix: improves control bar hiding functionality (#6400)

Fixes #6391
This commit is contained in:
Grzegorz Blaszczyk 2020-01-15 18:11:03 +01:00 committed by Gary Katsevman
parent 7008777985
commit 6f77778a70

View File

@ -3860,7 +3860,7 @@ class Player extends Component {
mouseInProgress = this.setInterval(handleActivity, 250);
};
const handleMouseUp = function(event) {
const handleMouseUpAndMouseLeave = function(event) {
handleActivity();
// Stop the interval that maintains activity if the mouse/touch is down
this.clearInterval(mouseInProgress);
@ -3869,7 +3869,8 @@ class Player extends Component {
// Any mouse movement will be considered user activity
this.on('mousedown', handleMouseDown);
this.on('mousemove', handleMouseMove);
this.on('mouseup', handleMouseUp);
this.on('mouseup', handleMouseUpAndMouseLeave);
this.on('mouseleave', handleMouseUpAndMouseLeave);
const controlBar = this.getChild('controlBar');