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

Running JW Player in a lightbox


I have JW Player installed on my Wordpress website home page, and by default it is running a video hosted on my server. When the user presses the play button I'd like the player to expand and run while being displayed in a lightbox. Can someone provide a link or code on how to do this?

Thanks,
Kevin

5 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v4/21/jw-box-the-jw-player-lightbox

JW Player

User  
0 rated :

Thanks Ethan. The warning that JWBox is not supported kind of put me off, but I gave it a try but unfortunately couldn't seem to get it to work. However I was able to use the Lightbox Plus plugin to get it up and running in a lightbox using the code at this link:

http://wordpress.org/support/topic/plugin-lightbox-plus-simple-example-for-simple-jw-player-activated-by-a-link-click?replies=4

Here is my updated code:

bc.. <a class="lbp-inline-link-1" href="#">Text Link</a>
<div style="display:none">

<div id="lbp-inline-href-1"">
<div id="video-player-container-home">

<script type="text/javascript" src=[jwplayer.js]></script>
<div id='video-player'></div>
<script type='text/javascript'>
jwplayer('video-player').setup({
flashplayer: [player.swf],
file: [myfile],
image: [myimage],
wmode: "window"
});
</script>

</div><!-- lbp-inline-link-1 -->
</div><!-- lbp-inline-href-1 -->
</div><!-- video-player-container -->



Instead of a text link I'll replace it with an image of the player. Anwyays I was hoping you could answer a couple of follow-up questions.

First, I would like the player to be sized based on the size of the viewer's display resolution (e.g. 80% width, 16:9 aspect ratio for the height). Can you tell me how I could do this instead of setting a static size?

Second, can you tell me how to start playing video when the link is pressed? Right now the user needs to press the link, then press play.

Thanks again,
Kevin

Ethan Feldman

JW Player Support Agent  
0 rated :

1) That would have to be done via % based width/height – http://developer.longtailvideo.com/player/trunk/fl5/js/test/examples/hundredpercent.html

2) Change:

wmode: “window”

To:

wmode: “window”,
autostart: “true”

JW Player

User  
0 rated :

Great, thanks again.

Kevin

Ethan Feldman

JW Player Support Agent  
0 rated :

Np

This question has received the maximum number of answers.