Size of player


The width of the player is always stretched to the size of its container. The default height is calculated from the aspect ratio of 16:9 (the most popular aspect ratio of video). In the settings Size and color, this aspect ratio can be changed to 4:3 and the Container size value.

If the option Adapt to aspect ratio of video is enabled, the player will automatically change the height according to the aspect ratio of the video. If aspect ratio of the player is 16:9 and video ratio is 4:3, then the player will change height to ratio 4:3 (it does not work with YouTube and with players inside the iframe).

Container size

In this case, the player stretches to the width and height that is specified in the CSS of container.

<div style="width:500px;height:281px">

If CSS doesn't specify a height, the player may not be displayed.

If you specify the height in percent, the player will automatically switch to the "Container size" mode.

<div style="width:100%;height:100%">

How to stretch the player to the full page

Enable the Container size option in the player settings (Settings / Size and Color / Aspect ratio) and specify the container in CSS 100% for width and height, as in the example above. If there is nothing else on the page, only the DIV with the player on the whole screen, then for HTML and BODY it is necessary to specify 100% of the dimensions, because the height of the div in percent depends on the height of the parent element.

<style> html,body{width:100%;height:100%} </style>


The Art of Players
2018 © PlayerJS with ♥

Login

Restore password
Sign up
Log in

Sign up free

Sign up
By signing up, you agree to Terms of Service
Login if you have an account

Order player

Your name
What project do you need a player for?
Email
Phone
Description
Send
You agree to processing of this personal data.

Restore password

Restore
Forgot email? Contact us