mirror of
https://github.com/videojs/video.js.git
synced 2025-03-03 15:12:49 +02:00
make seekbar seekable on mobile devices.
This commit is contained in:
parent
610974854c
commit
95e87be2d2
5
src/js/controls.js
vendored
5
src/js/controls.js
vendored
@ -482,6 +482,7 @@ vjs.Slider = function(player, options){
|
||||
player.on(this.playerEvent, vjs.bind(this, this.update));
|
||||
|
||||
this.on('mousedown', this.onMouseDown);
|
||||
this.on('touchstart', this.onMouseDown);
|
||||
this.on('focus', this.onFocus);
|
||||
this.on('blur', this.onBlur);
|
||||
|
||||
@ -512,6 +513,8 @@ vjs.Slider.prototype.onMouseDown = function(event){
|
||||
|
||||
vjs.on(document, 'mousemove', vjs.bind(this, this.onMouseMove));
|
||||
vjs.on(document, 'mouseup', vjs.bind(this, this.onMouseUp));
|
||||
vjs.on(document, 'touchmove', vjs.bind(this, this.onMouseMove));
|
||||
vjs.on(document, 'touchend', vjs.bind(this, this.onMouseUp));
|
||||
|
||||
this.onMouseMove(event);
|
||||
};
|
||||
@ -520,6 +523,8 @@ vjs.Slider.prototype.onMouseUp = function() {
|
||||
vjs.unblockTextSelection();
|
||||
vjs.off(document, 'mousemove', this.onMouseMove, false);
|
||||
vjs.off(document, 'mouseup', this.onMouseUp, false);
|
||||
vjs.off(document, 'touchmove', this.onMouseMove, false);
|
||||
vjs.off(document, 'touchend', this.onMouseUp, false);
|
||||
|
||||
this.update();
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user