Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Multiple Players, on Same page


I'm wondering what the best way to add multiple players to the same page is. (they each point to different videos).

Through trial and error, a solution seems to be to change "preview" and give it a number in both areas it shows up. (is there a better method?, will it cause problems?)

PLAYER 1:
<p id='preview1'>The player will show in this paragraph</p>
<### OTHER CODE...>
s1.write('preview1');

PLAYER 2:
<p id='preview2'>The player will show in this paragraph</p>
<### OTHER CODE...>
s1.write('preview2');

5 Community Answers

JW Player

User  
0 rated :

Use the search box at the top of this page to search the forums for "multiple players".

JW Player

User  
0 rated :

The same idea worked great for me - trying to display correctly in IE, but the code in mine looks like this:

PLAYER 1:
<div id="mediaspace1">The player will show in this paragraph</div>
<### OTHER CODE...>
so.write('mediaspace1');

PLAYER 2:
<div id="mediaspace2">The player will show in this paragraph</div>
<### OTHER CODE...>
so.write('mediaspace2');

JW Player

User  
0 rated :

I would suggest to use swfobject.js to place the player. The latest version, 2.2 works great for me.

The methods described are fine too, but I would recommend not to use the same variable ("s1" or "so") over and over again. This can have some side effects. Use s1, s2, s3 etc.

JW Player

User  
0 rated :

Numbering the Mediaspace is the key! sweet.
And making the "s" variables match is a great way to keep everything in order.

so1.
so2.

etc.

JW Player

User  
0 rated :

bc.. DB Cooper Tue, 2010-02-23 00:44
Numbering the Mediaspace is the key! sweet.
And making the "s" variables match is a great way to keep everything in order.

so1.
so2.

etc.


worked for me too...
God Bless

This question has received the maximum number of answers.