We've expanded our news coverage and improved our search! Visit news.oreilly.com for the latest or search for all things across O'Reilly!
advertisement

Article:
  Build a Simple MP3 Player for Your Site
Subject:   Stop When Next Song Played?
Date:   2007-05-26 10:06:21
From:   vernaflypaper
I'm using this in a "jukebox" type thing ... people are clicking on another song before the first is finished and sometimes have 3 songs playing at the same time. Is there any way to have the currently-playing song stop when a new link is clicked? Is there any other way around this?
Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • David Battino photo Stop When Next Song Played?
    2007-05-28 12:58:33  David Battino [Reply | View]

    Is there any way to have the currently-playing song stop when a new link is clicked?

    Yes. Set all pop-up windows to the same ID. That will cause each new pop-up to replace the last. The newer version of this script (see link at beginning of article) does that. You can do it here by removing the following line:

    UniqueID = UniqueID + 1