Skip to main content
AshokSuccess
Inspiring
April 28, 2010
Question

Multiple Song playing at the same time

  • April 28, 2010
  • 1 reply
  • 955 views

Hi,

I have developed a Player where I am using FMS to play MP3 files, it works great in normal scenario but when user keep on clicking new songs from Song List (List Component) then the player stated playing all songs. Which It should not do.

Is there a way that we can unload previous song before loading new song.

Thanks in Advance,

    This topic has been closed for replies.

    1 reply

    Participating Frequently
    April 28, 2010

    Is it possible for you to share your code. But i think what you are doing is nothing but stacking all the plays basically creating playlists. If i am mistaken your code would have following code line:

    ns.play("streamname",0,-1,false)

    If my assumption is right, you need to simple thing, replace false by true i.e each time you click on list component to select new song, you will call

    ns.play("streamname",0,-1,true) //where streamname is fetched from property of list component which represents stream name.

    When you make reset parameter to true, it resets your playlist and starts playing your new song.

    AshokSuccess
    Inspiring
    April 28, 2010

    Hi SE_0208,

    Thanks for your reply. Actually I am using something like

    ns.play("streamname",0);

    not anything extra.

    is there a way to unload previous sound.

    Thanks in Advance.

    Ashok

    Participating Frequently
    April 28, 2010

    Yes, instead of ns.play("streamname",0) use ns.play("streamname",0,-1,true)

    let me know if that does not solve the issue.