Can anyone help me create a javascript/jquery function to control the HTML5 audio tag control seekbar?? (Or suggest me a web resource from where I can learn).
I want to customize the looks of the default controls and so I want to handle the progress in a different <div>
. How can I achieve that?
views:
75answers:
1
A:
Use any JavaScript slider control that you want and do two things:
- listen for changes (clicks) and set
audioNode.currentTime
- conversely, periodically set the slider's value to
audioNode.currentTime
Delan Azabani
2010-08-21 10:21:06
My problem is, i'm very new to javascript!! :)
ptamzz
2010-08-21 10:24:53
If you want to use jQuery, this may help: http://jqueryui.com/demos/slider/
Delan Azabani
2010-08-21 10:29:32
Thank you very much. I'll see what I can do with that. :)
ptamzz
2010-08-21 10:33:58
Hello, can you help me with this?? Is there some event like "onCurrentTimeChange"??What I want to do is, as the audio plays on, I want to trigger an event and reset the seeker position through something like function setSeekerPosition() {seekbar.value = audio.currentTime;}audio.onCurrentTimeChange = setSeekerPosition;If I'm totally wrong, please redirect me!!
ptamzz
2010-08-21 13:00:05
There is a "timeupdate" event that you can add a function listener to. https://developer.mozilla.org/en/using_audio_and_video_in_firefox
Delan Azabani
2010-08-25 07:13:31