src/js/widgets/sliderWidget.js
branchpopcorn-port
changeset 842 4ae2247a59f4
parent 838 03b03865eb9b
child 874 38b65761a7d5
--- a/src/js/widgets/sliderWidget.js	Tue Apr 03 20:30:12 2012 +0200
+++ b/src/js/widgets/sliderWidget.js	Fri Apr 06 16:49:32 2012 +0200
@@ -52,7 +52,7 @@
   
   var time = this._Popcorn.currentTime();
 
-  var duration = this._serializer.getDuration() / 1000;
+  var duration = this.getDuration() / 1000;
   var percents = time / duration;
   
   /* we do these complicated calculations to center exactly
@@ -92,7 +92,7 @@
   var width = this.sliderBackground.width();
   var relX = event.pageX - parentOffset.left;
 
-  var duration = this._serializer.getDuration() / 1000;
+  var duration = this.getDuration() / 1000;
   var newTime = ((relX / width) * duration).toFixed(2);
 
   this._Popcorn.currentTime(newTime);
@@ -105,7 +105,7 @@
   var width = this.sliderBackground.width();
   var relX = event.pageX - parentOffset.left;
 
-  var duration = this._serializer.getDuration() / 1000;
+  var duration = this.getDuration() / 1000;
   var newTime = ((relX / width) * duration).toFixed(2);
 
   this._Popcorn.currentTime(newTime);
@@ -133,7 +133,7 @@
 IriSP.SliderWidget.prototype.mouseOutHandler = function(event) {
 
   this.timeOutId = window.setTimeout(IriSP.wrap(this, this.minimizeOnTimeout),
-                                     IriSP.widgetsDefaults.SliderWidget.minimize_period);
+                                     this.minimize_period);
 };
 
 IriSP.SliderWidget.prototype.minimizeOnTimeout = function(event) {
@@ -162,7 +162,7 @@
   var width = this.sliderBackground.width();
   var relX = event.originalEvent.pageX - parentOffset.left;
 
-  var duration = this._serializer.getDuration() / 1000;
+  var duration = this.getDuration() / 1000;
   var newTime = ((relX / width) * duration).toFixed(2);
   this._Popcorn.currentTime(newTime);