src/js/utils.js
branchpopcorn-port
changeset 160 d3f336807ec3
parent 103 2dfd89e91c3a
child 238 6008172a0592
child 252 fd84e0fb26d8
equal deleted inserted replaced
159:de92bfdcbe4c 160:d3f336807ec3
    23   }
    23   }
    24 }
    24 }
    25 
    25 
    26 /* convert a time to a percentage in the media */
    26 /* convert a time to a percentage in the media */
    27 IriSP.timeToPourcent = function(time, timetotal){
    27 IriSP.timeToPourcent = function(time, timetotal){
    28 	return (parseInt(Math.round(time/timetotal*100)));
    28 	// return (parseInt(Math.round(time/timetotal*100)));
       
    29 	return Math.floor((time/timetotal) * 100);
    29 };
    30 };
    30 
    31 
    31 /* for ie compatibility
    32 /* for ie compatibility
    32 if (Object.prototype.__defineGetter__&&!Object.defineProperty) {
    33 if (Object.prototype.__defineGetter__&&!Object.defineProperty) {
    33    Object.defineProperty=function(obj,prop,desc) {
    34    Object.defineProperty=function(obj,prop,desc) {