Support » Plugin: WPaudio MP3 Player » [Plugin: WPaudio MP3 Player] Total Time Not Displaying

  • I hope questions here are still being reviewed…

    Everything is working properly except one thing. When you click on the player, the progress bar shows below with the current timecode displaying underneath that(as it should). However, the “/” and total timecode are missing. Is there a reason for this? Are there certain codecs that aren’t supported. It’s playing an mp3 file. I was given the file, so not sure what software was used at this point.

    Another possible cause is I had to upload the file using a separate ftp program. So WordPress doesn’t “see” the file in it’s media library. Could that be the problem?

    Thanks so much in advance for your help. KT

Viewing 5 replies - 1 through 5 (of 5 total)
  • I really hope I can get an answer for this. There’s a number of reasons I really want this to work.
    1-I like how the player looks. Doesn’t take over the design
    2-It works on iPhones
    3-It helps protect from downloads

    But I really need it to display total time. If we can’t, I’ll have to display it manually on a separate line. I would prefer it displays it as part of the player like it’s supposed to.

    Maybe this player has just become buggy as technology has moved forward?

    Hi … is this what you want:

    I’ve spent a good few hours studying the code and learning about the relevant technologies – so when I saw your problem I thought to myself – now this is easy peasy. 🙂

    If you find the //set time part in the non-minified code, you can just add a bit to show all the times as I have done below – but you’ll have to re-minify the code, or just rename the minified js file to “old” or something, and for now change the non-minified js file and rename it (a lie) to the minified js file name.

    // Set time
    		var min = Math.floor(info.position / 60);
    		var sec = Math.floor(info.position % 60);
    		var time_string = min + ':';
    		if ( sec < 10 ) {
    			time_string += '0'; // Add leading 0 to seconds if necessary
    		time_string += sec;
    		var min1 = Math.floor(info.duration / 60);
    		var sec1 = Math.floor(info.duration % 60);
    		var time_string1 = min1 + ':';
    		if ( sec1 < 10 ) {
    			time_string1 += '0'; // Add leading 0 to seconds if necessary
    		time_string1 += sec1;
    		jQuery(elem).parent().find('.wpaudio-position').text(time_string + '/' + time_string1);

    Hope that helps

    Best wishes


    Oops – chopped a bit off at the end somehow, I think:

    jQuery(elem).parent().find(‘.wpaudio-position’).text(time_string + ‘/’ + time_string1);

    Thanks so much for taking the time to respond. Sorry I didn’t respond sooner. I just gave up on getting help and didn’t look back here for about a month.

    I tried this code. I can read what it’s doing (I actually created something like this in flash for video in the past. I’m not a javascripter, though — is that a word??)

    Anyway, I put this in and it’s not adding anything to the display for me. I suppose it could be caching the player. I commented out the existing code under set time and put in what you had above. I don’t really understand terms like non-minified or re-minify code.

    I can’t put my link up, because the site isn’t released yet. But the link above is pretty much exactly what I want (minus the download link, but I already got that set.)

    I kind of figured I’d be stuck with putting the total time manually on separate line. I’m still open to getting this working, though.

    Dear davros1973

    Thank you thank you thank you! I downloaded this plugin and was having the same problem with the total time not displaying. and your code did the trick, absolutely perfect. Can’t thank you enough.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: WPaudio MP3 Player] Total Time Not Displaying’ is closed to new replies.