Portal Home > Knowledgebase > Articles Database > How to have 1 player playing at the time


How to have 1 player playing at the time




Posted by bambinou, 02-20-2012, 07:47 PM
Hello, I have been selling my own songs on a blog, the problem is that when people listen to the music, they have to manually click on "stop play" before going to the next player. Some pages have about 20 players...it becomes a nightmare quite fast. How to have only one single player playing at all time please? For example if you have player 1 and player 2, when player 1 is on, all the other players turn off if any are started. This is my player code:
Thank you! Ben

Posted by GORF, 02-21-2012, 12:13 AM
Does the player work with a playlist? Just use one player on a page that way.

Posted by bambinou, 02-21-2012, 06:14 AM
Hi, No I cants do that because I have a description next to each song, having one single player look a little strange, the look of the site is great with all these players, it load fast aswell. I have seen so many sites where no more than one player can be clicked at any one time, I wonder how they do this. Any idea anyone? Thank you, Ben

Posted by Nathan C, 02-23-2012, 06:52 PM
Then why not implement a player that allows descriptions?

Posted by bambinou, 02-23-2012, 06:57 PM
Hi Nathan, Thank you for the reply, Do you know a free player that can do that please? I liked the dew player because it looked quiet pretty. Thank you, Ben

Posted by Grumps, 02-24-2012, 07:36 PM
Flash can interact with javascript. Namely "external interface". So, if you start playing on the flash player, the flash player can send a "stop" javascript command via external interface. Then, the "stop" javascript function can send a stop message to all the other players on the page.

Posted by Nathan C, 02-25-2012, 01:04 AM
An old flv player I used to play around with is the jw player, you can get it at http://www.longtailvideo.com/players/. There is an addon called InfoBox that should be something along the lines of what you are looking for.

Posted by HostXNow_Chris, 02-25-2012, 06:02 AM
Like this http://soundcloud.com/dj-nico-5 ?

Posted by bambinou, 02-25-2012, 06:34 AM
Yes HostXNow, Exactly like this one. When you click play on one, it stops the others. Thanks, Ben

Posted by HostXNow_Chris, 02-25-2012, 12:21 PM
Thought so. I don't know how though. I'm after a decent music sharing script myself. A SoundCloud clone would be perfect, or one similar to it would do.

Posted by Whiteshizzle, 02-25-2012, 01:19 PM
Well since you're using Dewplayer you can use the Javascript support. Put javascript=on in the flashvars and you can then call dewstop() to stop. You can use jQuery's each() function to loop through elements in a class and stop the player before starting the next one.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
aventure-media.co.uk (Views: 508)
Helm V4 (Views: 488)
Kualo Reseller Hosting (Views: 472)