Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

conflicting players

3 replies [Last post]

On http://way.fm I have an embedded player that pulls in a youtube video. Next to it I have some thumbnails that open a pop-up window with the youtube video related to that icon.

If you start the one on the homepage, then stop it, then open a pop-up player and start that one, it actually starts the one on the homepage, and tells me you can't connect to youtube twice at a time.

If you reverse the process and start with the pop-up, the pop-up version works fine but the one embedded on the homepage fails.

What gets me is that I'm doing the *exact* same thing on http://wcsg.org, it's the same php codebase generating the players, and that one works fine.

Any ideas?

 
For multiple players, you need to give each player a unique name/id for the object element:

var sdisciple_laymyburdens = new SWFObject('/includes/player/player.swf',<strong>'mpl1'</strong>,'317','213','9');

And make sure that SWFObject is writing the object element to an HTML element with a unique id:

sdisciple_laymyburdens.write(<strong>'player_disciple_laymyburdens1'</strong>);

For multiple Youtube videos, you need to use the latest player and the corresponding YouTube proxy yt.swf, which can handle multiple Youtube requests.

Player and Youtube proxy: http://developer.longtailvideo.com/trac/browser/trunk/as3

There's only one player per window, the conflict is occuring between two completely separate windows. Does that matter? Since I only have one player per page, I only have one id per page.

It might be that the server is keeping the connection to yt.swf open. Try upping the number of simultaneous connections to the server to test it out.