28.02.2017, 01:11 
(This post was last modified: 28.02.2017, 07:55 by Erwin van der Zwart.)
		
	
	
		Hi Josep,
Use a 3 byte RGB object, set it to read only and give it the additional class 'playprogress' and pick any color on the object (;
Then use this script:
BR,
Erwin
	
	
	
Use a 3 byte RGB object, set it to read only and give it the additional class 'playprogress' and pick any color on the object (;
Then use this script:
Code:
     function FormattedTimeToSeconds(formattedtime) {
        var a = formattedtime.split(':'); // split it at the colons
        // minutes are worth 60 seconds. Hours are worth 60 minutes. 
        var seconds = (+a[0]) * 60 * 60 + (+a[1]) * 60 + (+a[2]); 
        return seconds;
        }
      var passed = 0;
      var durationseconds = FormattedTimeToSeconds(res_parsed[6].duration);
      var playingtimeseconds = FormattedTimeToSeconds(res_parsed[7].playingtime)
      if (durationseconds > playingtimeseconds){
          passed = durationseconds - (durationseconds - playingtimeseconds);
          passed = Math.floor(((passed / durationseconds) * 100) * 4); // set to * x for each 100px
      } else {
          passed = 0;
      }  
      $("#plan-" + currentPlanId).find(".playprogress").css( "min-width", "0px", 'important' );
      $("#plan-" + currentPlanId).find(".playprogress").css( "max-width", passed + "px", 'important' );
      $("#plan-" + currentPlanId).find(".playprogress").css( "width", passed + "px" );BR,
Erwin