Have a sound wav play from the beginning every time?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • OBAFGKM_RNS@yahoo.com

    Have a sound wav play from the beginning every time?

    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.getEle mentById("wl1_c lick");sound.Pl ay();

    and in my html:
    <embed id="wl1_click" src="clickb.wav " width="0" height="0"
    autostart="fals e">
  • OBAFGKM_RNS@yahoo.com

    #2
    Re: Have a sound wav play from the beginning every time?

    On Jul 2, 10:49 pm, OBAFGKM_...@yah oo.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.getEle mentById("wl1_c lick");sound.Pl ay();
    >
    and in my html:
    <embed id="wl1_click" src="clickb.wav " width="0" height="0"
    autostart="fals e">
    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.

    Comment

    Working...