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

Height of my jwplayer is always 270 px

Hi all,

Already many thanks for your help.
For the sake of simplicity, I've created a very simple page with only a jwplayer to expose you my problem.

Please see the code below:

<!DOCTYPE html>
<html lang="fr">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" type="text/css" href="css/style.css">
<script src=""></script>
​<script src="js/jwplayer.js"></script>

<div id="myElement">Loading the player...</div>

var playerInstance = jwplayer('myElement');
file: "inde-les-portraits-de-craie.mp4",
image: "video-thumbnail.jpg",
width: '100%',
mediaid: '123456'

You can see the result here :

The jwplayer is taking the whole width, as asked (100%). However, the height is not adapted automatically and always stays at 240px. Therefore and to respect the 16:9 ratio aspect, the width of the video is 480px.

How can I make the player compute automatically the required height so that the video takes the whole width?

I've looked around on the communty, but didn't find any answer so far...

Thank you for your help,


3 Community Answers


JW Player Support Agent  
1 rated :

Hi, there.

The correct option for the embed code for aspect ratio is aspectratio, not aspect. Please change that on your page and let me know if the issue is resolved.

Thank you.


0 rated :

Hi Alex,

I feel very stupid now... It works like a charm with the correct property name :-)

Many thanks for your help !

Kind regards,


JW Player Support Agent  
0 rated :

Not a problem!

This question has received the maximum number of answers.