SunnyD
SunnyD

Reputation: 71

Controlling Flowplayer Video Aspect Ratio

Hello I am developing an online video streaming website. I am using flowplayer(HTML5) to run the videos. I have a question; is it possible to control aspect ratio of the player? I ask this because for some mp4 videos, an aspect ratio of 0.5625 seems perfect while for some a ratio of 0.417 is perfect. I am a newbie and cannot figure out how to proceed. Can anyone help?

Upvotes: 0

Views: 4208

Answers (1)

Panama Jack
Panama Jack

Reputation: 24448

Flowplayer is nice. Yes you can control the aspect ratio in various ways.

You can change the ratio in the player configuration:

flowplayer.conf.ratio = 3/4;

Or you can set the ratio in the HTML configuration using the data-ratio attribute of the container element as follows:

<div class="player" data-ratio="0.417">
   <video>...</video>
</div>

The default value of data-ratio is "0.5625", i.e. the default ratio of 9/16. Alternatively you can change the container's ratio via CSS:

.flowplayer .fp-ratio {
   padding-top 41.7%
}

More info can be found here http://flowplayer.org/docs/

Upvotes: 1

Related Questions