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

How to resize JWPlayer when containing div resizes


I'm trying to use jwplayer in responsive mode but when I resize the containing div the player itself doesn't resize. I've tried a few different approaches to parameters for the .resize() API call but it behaves as documented and requires a fixed height for the second parameter. Is there a way to trigger a re-drawing of the player without interrupting the video and without requiring a fixed height?

2 Community Answers

Jonathan

User  
0 rated :

So although leaving out the height when initializing the player seems to be responsive in that it sizes to fit the video initially it does not actually act responsive. I took another look at https://support.jwplayer.com/customer/portal/articles/1406644-making-jw-player-responsive and saw that it does set aspect ratio so I gave that a try and it resizes as expected. All the video content in this application should be the same aspect ratio but it would be nice to be able to set only the width and have jwplayer adapt even more dynamically.

George

JW Player Support Agent  
0 rated :

Hi,

Here’s a test page with what I believe you’re looking for:
http://qa.jwplayer.com.s3.amazonaws.com/~george/responsive_div_fixed_player.html

This question has received the maximum number of answers.