Is it possible to make audio player with timebar?

  • Hello,

    I need to make an audio player within panorama.
    Everything is fine except that i'm missing some major things to implement the timebar.
    For example, i'd like to have currentTime attribute or some event (like ontimechanged) or something what let me determine what is the position of the currently played sound.
    I'd like to have duration info.
    I've tried to estimate the trackbar position by counting the time, but this approach has some serious issues.

    So, the question is - is it possible to make audio player with timebar at all?
    And if yes - then what approach to use to implement it?

    Thanks,
    Tomas

  • Well, that's sad, because i have to make it... Anyway - thank you for reply!
    Maybe there is somewhere .js and flash version of soundinterface plugin?
    It shouldn't be hard to add such features.
    Or maybe there is some commercial plugin - so i don't have to code it from scratch myself?

    Thanks,
    Tomas

    Hi!
    currently it's not possible
    Only way you can do it is convert audio to video, make video plugin invisible and play it.
    But it's not working for html5 unfortunately

  • Hello there!

    I raise this thread as I'm very interested in having that king of data from a sound (html5 only).

    Maybe someone has a pretty solution (or Klaus has?)...

    For those interested with a workaround, I would set a kind of "data" tag with file name and manually entering the time I KNOW it is. Then , by using the frame rate/timeelapsed, you are able to know the percent of the file played.

    The Very Ugly Way:
    (I'm sure a better person that I will produce a more efficient code)

    Code
    <data name="soundstuff" fileurl="my.mp3" length="180" elapsed="0" />
    <action name="onstartsound">
       tween(data["soundstuff"].elapsed, 1, get(data["soundstuff"].elapsed), default, trace("finished :)"));
    </action>
    
    
    <action name="onrefresh">
       trace("We are at ", get(data["soundstuff"].elapsed), "/", get(data["soundstuff"].length), " of the file...");
    </action>

    I know. It's awful, but it's the way I found ;)

    « Quidquid latine dictum sit, altum sonatur »
    Pentax stuff.

  • Hi,

    I made this some months ago, with playlist.
    I used the videoplayer as soundinterface *wink*
    Just let it play your mp3's

    Hope it nelps!
    Tuur *thumbsup*

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!