Simple audio player

Showing 1-11 of 11 messages
Simple audio player Steph 5/5/12 2:11 AM
I've created an extremely simple audio player which has a play/pause button and a slider that shows where the audio playing is up to.

I'd like to be able to drag the slider and move forward and back in the audio. Has anyone done this? Any help would be appreciated. Basically tips on how it would be done or if it is even possible with the current PhoneGap media object.

Cheers,
Steph
Re: Simple audio player Devgeeks 5/5/12 2:52 AM
Re: [PhoneGap] Re: Simple audio player Steph 5/5/12 11:29 PM
Although I appreciate the response, just a link to a page I already have seen since I am already using the media object in phonegap is not particularly helpful. 

I guess I was more looking for people who have done this before and have some experience in the difficulty I'm facing. I am using the seekTo method, and though it sort of works, I am more struggling with the fact that in order to get the slider tracking, I"m having to use getCurrentPosition, and that along side seeking while moving the slider is overwhelming the phone and is really jerky and doesn't work very well.

I could have been more clear, but more in depth help, by someone who got something like this working. Some hints to maybe if they are listening to the dragging of the slider, or just the finish of the drag to then seek. Maybe whether or not they had to remove the getCurrentPosition while it was being dragged?

I've tried a bunch of stuff but can't seem to get the perfect combination.

Cheers,
Steph

http://docs.phonegap.com/en/1.7.0/cordova_media_media.md.html#media.seekTo
--
You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com

Re: [PhoneGap] Re: Simple audio player Simon 5/15/12 5:04 PM
Hey Steph,

Did you make any progress on this? I'm looking at doing something similar for a side project.
Re: [PhoneGap] Re: Simple audio player Toshiya TSURU 5/15/12 6:18 PM
I'm interested in this topic, too.

Also I'm looking for a plugin which can change playback speed.
Toshiya TSURU <turut...@gmail.com>
http://blog.turutosiya.com/
Re: [PhoneGap] Re: Simple audio player Devgeeks 5/15/12 6:22 PM
For playback speed, doesn't webkit support changing this via: audio.playbackRate ?
Re: [PhoneGap] Re: Simple audio player Toshiya TSURU 5/15/12 6:33 PM
maybe "audio.playbackRate" is not supported on iOS, isn't It?
Re: [PhoneGap] Re: Simple audio player Devgeeks 5/15/12 6:47 PM
According to Apple: "Available in iOS 3.0 and later"


On Wednesday, May 16, 2012 11:33:13 AM UTC+10, Toshiya TSURU wrote:
maybe "audio.playbackRate" is not supported on iOS, isn't It?

On Wed, May 16, 2012 at 10:22 AM, Devgeeks  wrote:
> For playback speed, doesn't webkit support changing this via:
> audio.playbackRate ?

Re: [PhoneGap] Re: Simple audio player Toshiya TSURU 5/15/12 6:54 PM
great, Thanks!
Re: [PhoneGap] Re: Simple audio player Steph 5/28/12 6:35 PM
I did come up with something. It doesn't allow for seeking before the audio starts playing, but it is better than nothing. I am using it in a Sencha Touch app, but my basic code can probably be adjusted to work in any sort of javascript app, so I'll put it together and post it on here when I get home tonight.

Cheers,
Steph
Re: Simple audio player ericburnley 7/25/13 3:26 PM
I know this is an old post, just wanted to share a tool I used for something like this in case someone's still searching.

For Android, I, too, found that most sliders were pretty clunky in performance.  I somehow found this page with an RGB blend tool with touch-sensitive sliders (the only thing I can read is the code and an occasional word like "DEMO").  Tried the demo in my Android 2.3 phone and was really happy with the performance, so I incorporated it as a progress bar into a media player I was working on.  The touch is really responsive for sliding to the position you want, and within the body of this function, I use something like:
  my_media.seekTo(Math.round((width / max) * totalDur * 1000));

Since it leverages touchstart/end, it does a real good job of providing the *perception* of fast performance, which imo is half the battle.  I wind up doing a lot of touch event based styling to give that impression.  I'll post back when the final project is available for download.

http://iphone.dan.co.jp/404mnf.cgi/archives/51733122.html