Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

make sure buffer fraction is 0..1

  • Loading branch information...
commit 593556e6494641cb184f4559d8a134443f814aba 1 parent 56f4f1d
Carl Fürstenberg authored March 21, 2010

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. 4  jquery.video.js
4  jquery.video.js
@@ -353,7 +353,9 @@ $.widget("ui.video", {
353 353
 			total = e.originalEvent.total;
354 354
 
355 355
 			if( lengthComputable ) {
356  
-				this.bufferStatus.width(loaded/total * this.scrubberSliderAbsoluteWidth);
  356
+				var fraction = Math.max(Math.min(loaded / total,1),0);
  357
+
  358
+				this.bufferStatus.width(Math.max(fraction * this.scrubberSliderAbsoluteWidth));
357 359
 			}
358 360
 
359 361
 		},

0 notes on commit 593556e

Please sign in to comment.
Something went wrong with that request. Please try again.