1
0
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:
Steve Heffernan 2010-07-21 17:11:00 -07:00
parent 86e926f94a
commit 6bd7473f13
2 changed files with 3 additions and 3 deletions

View File

@ -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/

View File

@ -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){