• Hi,

    Normally, when I click the play button on a given player, any other player that is currently playing will stop. I call this the “auto-stop” functionality.

    I have a web page where I have a bunch of audioplayer instances. The page is ajaxed so that the user can browse sound clips without having to reload the whole page.

    The problem is this: after I load the new sound clips with an AJAX call, the player no longer auto-stops.

    I looked at the source code for AudioPlayer as well as swfobject but could not find a solution.

    Thanks!

    Dobo

Viewing 1 replies (of 1 total)
  • In audio-player.js, the call that closes the previous player needs to be wrapped in a try-catch. This is becausee the previous flash player may not exist when ajaxing content. So just find the two instances and wrap them like so:

    try
    { getPlayer(activePlayerID).close(); }
    catch(err) {}

Viewing 1 replies (of 1 total)
  • The topic ‘Auto-stop does not work after AJAX load.’ is closed to new replies.