I'm using 6.x-4.1-rc6 with flowplayer module. Selecting the video player size based on the video size doesn't work right because the size you select is used for the whole flowplayer object and doesn't take into consideration the extra 24 pixels that flowplayer needs to display its controls.

I initially starting making extra resolutions available but found it annoying. IMHO, we should select the size that the video should play at and let the code figure out the correct size of the player object.

So, I modified video_formatter.inc to take that into consideration. Patch included.

CommentFileSizeAuthor
video_formatter.patch489 bytesbkat

Comments

parasox’s picture

Applied this patch and it works well, I was wondering why my video had black bars on the sides even though I set it to encode and set the player at the same size.

Now I have very very thin black bars at the top and bottom. Are your videos playing perfectly flush with the player bkat?

Another great patch, thanks!

hypertext200’s picture

Status: Active » Patch (to be ported)

added to the dev

bkat’s picture

I just updated to video-6.x-4.2-alpha2.tar.gz and noticed a bug with the code that was checked in.

            // adding 24px to height #973636
            array('style' => 'width:' . $video->player_width . 'px;height:' . $video->player_height + 24 . 'px;')

should be

            // adding 24px to height #973636
            array('style' => 'width:' . $video->player_width . 'px;height:' . ($video->player_height + 24) . 'px;')

+ and . have the same precedence in php so omitting the parens causes the expression to group left to right as
(A.B.C.D)+(E.F) and not A.B.C.(D+E).F

hypertext200’s picture

Status: Patch (to be ported) » Fixed

Added to dev

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.