AudioPlayer and playback position
Is there any API for setting the current playback position (i.e. a writable equivalent to the progress property)?
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.
-
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);
. -
I have finally found a suitable workaround / hack for settings playback position.
Check the second answer here: http://developer.appcelerator.com/question/66911/please-add-currentplaybacktime-to-titaniummediavideoplayer
The key is to use VideoPlayer.
-
Up please!
-
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.
-
This is set from the sound object, not the audioplayer object. The method is sound.setTime();