Audio file end time

Hi fellow Bubblers,

I need help in getting the time string remining of an audio file instead of default duration time string.

I tried deducting duration string from current time string using :converted to number, but it’s always resulting in division of 100 e.g., if the audio file duration time string is 3 min i.e., 180 sec. It is giving me 300 as a result.

Something wrong in the calculation. Are you inferring percentages? Can you share screenshots?

If its somehow always showing 100 seconds per minute just multiply by .60 and u have the right amount of seconds.

Not using percentages, but it’s a good idea to multiply with 0.60. OMG :slight_smile:

It’s giving me seconds, but whenever video is playing the decimal starts from 2.99 and so on instead of 2.59 - if the video is for 3 minute.

It can’t be 2.59 that would be accurate. the decimal point is the percentage of a minutes. 59 seconds is not 59% of a minute… Keep it as seconds and convert seconds to be minutes and seconds

Here is the screenshot

Convert each number duration and time remaining into seconds then the final number is in seconds and you can get mins from it.

Side Point: Is duration supposed to a string??

I am pulling these data from a Plugin named Audio player full BEP.

It is giving me two number for each current time and duration -

Current time - value (which is in seconds) and string (which is formatted with two decimal e.g., 2.51 showing the remining time.

Duration time - value (which is in seconds) and string (which is formatted with two decimal e.g., 3.00 showing the total duration of the file.

This topic was automatically closed after 70 days. New replies are no longer allowed.