Procházet zdrojové kódy

fix printing to console for Internet Explorer 10, make fps available via this.benchfps

Maik Merten před 11 roky
rodič
revize
51523e78ac
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      jsmpg.js

+ 2 - 1
jsmpg.js Zobrazit soubor

@@ -414,7 +414,8 @@ jsmpeg.prototype.scheduleNextFrame = function() {
414 414
 		this.benchframe++;
415 415
 		var timepassed = now - this.benchstart;
416 416
 		if(this.benchframe >= 100) {
417
-			if(console) console.debug("frames per second: " + (this.benchframe / timepassed) * 1000 );
417
+			this.benchfps = (this.benchframe / timepassed) * 1000;
418
+			if(console) console.log("frames per second: " + this.benchfps);
418 419
 			this.benchframe = null;
419 420
 		}
420 421
 		setTimeout( this.nextFrame.bind(this), 0);