Have a sound wav play from the beginning every time?

Discussion in 'Javascript' started by OBAFGKM_RNS@yahoo.com, Jul 3, 2008.

  1. Guest

    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, 2008
    #1
    1. Advertising

  2. Guest

    On Jul 2, 10:49 pm, 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, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gezzed
    Replies:
    8
    Views:
    983
    Mark Parnell
    Aug 25, 2004
  2. '2+
    Replies:
    2
    Views:
    516
  3. Larry L
    Replies:
    5
    Views:
    112
    Larry L
    Oct 12, 2004
  4. Cehotec - Tim

    Play wav or sound file.

    Cehotec - Tim, Dec 4, 2007, in forum: Perl Misc
    Replies:
    4
    Views:
    186
    Cehotec - Tim
    Dec 5, 2007
  5. Replies:
    0
    Views:
    64
Loading...

Share This Page