mirror of
https://github.com/videojs/video.js.git
synced 2024-12-27 02:43:45 +02:00
Clearing play progress interval before setting it again, just in case.
This commit is contained in:
parent
86e926f94a
commit
6bd7473f13
@ -8,5 +8,4 @@ The base of VideoJS is Kroc Camen's [Video for Everybody](http://camendesign.com
|
||||
|
||||
View demo.html for an example of how to use it.
|
||||
|
||||
Based on the tutorial at http://blog.steveheffernan.com/2010/04/how-to-build-an-html5-video-player/
|
||||
|
||||
Based on the tutorial at http://blog.steveheffernan.com/2010/04/how-to-build-an-html5-video-player/
|
3
video.js
3
video.js
@ -569,6 +569,7 @@ var VideoJS = Class.extend({
|
||||
|
||||
// Track & display the current play progress
|
||||
trackPlayProgress: function(){
|
||||
if(this.playProgressInterval) clearInterval(this.playProgressInterval);
|
||||
this.playProgressInterval = setInterval(function(){ this.updatePlayProgress(); }.context(this), 33);
|
||||
},
|
||||
|
||||
@ -803,7 +804,7 @@ var VideoJS = Class.extend({
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
var _V_ = {
|
||||
addClass: function(element, classToAdd){
|
||||
if (element.className.split(/\s+/).lastIndexOf(classToAdd) == -1) element.className = element.className == "" ? classToAdd : element.className + " " + classToAdd;
|
||||
if (element.className.split(/\s+/).lastIndexOf(classToAdd) == -1) { element.className = element.className == "" ? classToAdd : element.className + " " + classToAdd; }
|
||||
},
|
||||
|
||||
removeClass: function(element, classToRemove){
|
||||
|
Loading…
Reference in New Issue
Block a user