1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-14 11:23:30 +02:00

Add vjs-scrubbing class to player while scrubbing

This commit is contained in:
Jacques Caron 2014-12-12 11:54:55 +00:00 committed by heff
parent 9c1e410660
commit 24dff158fa

View File

@ -75,6 +75,7 @@ vjs.SeekBar.prototype.onMouseDown = function(event){
vjs.Slider.prototype.onMouseDown.call(this, event); vjs.Slider.prototype.onMouseDown.call(this, event);
this.player_.scrubbing = true; this.player_.scrubbing = true;
this.player_.addClass('vjs-scrubbing');
this.videoWasPlaying = !this.player_.paused(); this.videoWasPlaying = !this.player_.paused();
this.player_.pause(); this.player_.pause();
@ -94,6 +95,7 @@ vjs.SeekBar.prototype.onMouseUp = function(event){
vjs.Slider.prototype.onMouseUp.call(this, event); vjs.Slider.prototype.onMouseUp.call(this, event);
this.player_.scrubbing = false; this.player_.scrubbing = false;
this.player_.removeClass('vjs-scrubbing');
if (this.videoWasPlaying) { if (this.videoWasPlaying) {
this.player_.play(); this.player_.play();
} }