Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

AudioPlayer and playback position

Is there any API for setting the current playback position (i.e. a writable equivalent to the progress property)?

— asked May 17th 2010 by Michael Descher
  • audioplayer
0 Comments

6 Answers

  • I think the trouble here is that with the AudioPlayer object being a 'stream', we can't get a 'duration' property to calculate a playback position like you can with the Sound object.

    — answered May 17th 2010 by Kosso
    permalink
    0 Comments
  • What does that matter? In my case I know the duration. I'll calculate the playback position with some simple math. All I want to do is something like AudioPlayer.start(offset);.

    — answered August 1st 2011 by Nick Robillard
    permalink
    0 Comments
  • Up please!

    — answered June 26th 2012 by Erkut Yz
    permalink
    0 Comments
  • There was a hack for this, but it stopped working a few versions of the mobile SDK ago. It brought seeking, remote control and other nice stuff to the AudioPlayer. If someone knows a working solution i would be really interested in it.

    Here's the pull request from the old hack.

    — answered June 26th 2012 by Stefan Schleich
    permalink
    0 Comments
  • This is set from the sound object, not the audioplayer object. The method is sound.setTime();

    — answered September 29th 2012 by Rick White
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.