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="http://p.jwpcdn.com/6/9/jwplayer.js"></script>
<div id="wrapper" style="width:580px;height:370px;">
<div id="my-video"></div>

</div> <script type="text/javascript"> jwplayer("my-video").setup({ file: "http://content.bitsontherun.com/videos/i8oQD9zd-kNspJqnJ.mp4", image: "http://content.bitsontherun.com/thumbs/i8oQD9zd-640.jpg", 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:

https://gist.github.com/emaxsaun/6b184b2f83f01c819688

This question has received the maximum number of answers.