By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,480 Members | 1,743 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,480 IT Pros & Developers. It's quick & easy.

Have a sound wav play from the beginning every time?

P: n/a
In my html, I have an embedded sound wav. I access that sound from my
javascript using Play() and Stop(). However, once stopped, the sound
will aways resume from where it left off, (making Stop behave more
like a Pause). I want it to start from the beginning.

The only way I've been able to start the sound from the beginning
every time, is to use inner.HTML to reload the embedded wav, thereby
reopening the media plugin. There is always a little hang time when
this happens.

Is it possible to have the wav play from the beginning every time
without reloading it every time? This is what I have:

in my javascript:
var sound = document.getElementById("wl1_click");sound.Play();

and in my html:
<embed id="wl1_click" src="clickb.wav" width="0" height="0"
autostart="false">
Jul 3 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Jul 2, 10:49 pm, OBAFGKM_...@yahoo.com wrote:
In my html, I have an embedded sound wav. I access that sound from my
javascript using Play() and Stop(). However, once stopped, the sound
will aways resume from where it left off, (making Stop behave more
like a Pause). I want it to start from the beginning.

The only way I've been able to start the sound from the beginning
every time, is to use inner.HTML to reload the embedded wav, thereby
reopening the media plugin. There is always a little hang time when
this happens.

Is it possible to have the wav play from the beginning every time
without reloading it every time? This is what I have:

in my javascript:
var sound = document.getElementById("wl1_click");sound.Play();

and in my html:
<embed id="wl1_click" src="clickb.wav" width="0" height="0"
autostart="false">
In all the hours that I've looked for help online, I never came across
"Rewind()". I just tried it and it works perfectly. I can't believe it
was that simple.
Jul 3 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.