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

Enlarge player on lcick

I would like to present the player let's say 300X250 px and would like that on the click the player enlarge in 600X500. Is it possibile in an easy way?

Thank you very much!

1 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

Sure thing, sample code:

<!DOCTYPE html>
<script src=""></script>
<div id="wrapper" style="width:580px;height:370px;">
<div id="my-video"></div>

</div> <script type="text/javascript"> jwplayer("my-video").setup({ file: "", image: "", width: "300", height: "250" }); document.getElementById('wrapper').onclick=function(){ if(jwplayer().getWidth() == 600) { jwplayer().resize(300,250); } else { jwplayer().resize(600,500); } }; </script>

Here is the gist:

This question has received the maximum number of answers.