Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

Convert Timecode to hh:mm:ss

4 replies [Last post]

Hey there,

We're using the 4.1 JW player with the stylish skin and currently the timecode display on the player shows the time in MM:SS format.

However, we stream long videos that play for up to an hour an a half and I want it to display the timecode as HH:MM:SS instead of MM:SS as that is what our audience is used to.

So how could I convert 93min and 24sec (99:24) into 1hr 39min and 24sec (1:39:24)?

Any help would be appreciated.

Matt

Hi,

I have the same problem. Does anyone know how to change the timecode display?

Thanks,
An

im not using a skin, and the timecode shows up when the player is loaded as "91:00" but when the audio file starts playing it switches to "501.28"

i'm putting duration=5046 in the code.

the code:

  <script type='text/javascript'>
  var s1 = new SWFObject('../player/player.swf','ply','470','20','9','#ffffff');
  s1.addParam('allowfullscreen','true');
  s1.addParam('allowscriptaccess','always');
  s1.addParam('wmode','opaque');
  s1.addParam('flashvars','file=http://www.mysite.com/.../audio.mp3&duration=5460');
  s1.write('mediaspace');
</script>

anyone has a working code solution for this?

id like to change the format as well as posted above ?

should be a 5 minute thing once u know which ´code to tweak anyone in for it....

line 25ish of utils/strings.as

i changed it to:

/**
* Convert a number to a digital-clock like string.
*
* @param nbr The number of seconds.
* @return A MN:SS string.
**/
public static function digits(nbr:Number):String {
var hr:Number = Math.floor(nbr/3600);
var min:Number = Math.floor(nbr/60-hr*60);
var sec:Number = Math.floor(nbr%60);
var str:String = Strings.zero(hr)+':'+Strings.zero(min)+':'+Strings.zero(sec);
return str;
};

BANG BANG