DancingSamurai.ca

Musings on Culture, Medicine, and Life in General
Subscribe

Zenphoto & Flowplayer aspect ratio issue

August 28, 2009 By: DancingSamurai Category: Site News

I use Zenphoto for my gallery, which uses the Flowplayer plugin (as one option) for playing videos (flv & mp4).

I just noticed this, but the out-of-the box settings for the above do not preserve the aspect ratio of videos (i.e. they are stretched to fit the player, or the screen in full screen mode). And there is no option to change this setting in zenphoto. (They have a dropdown for the aspect ratio of the THUMBNAIL – how useless is that?). So I did some hacking of the code, and now it works great!

So I edited the zp-core/plugins/flowplayer3.php file. There are three spots where this code appears (a few if…else blocks that depend on such things as the presence of a .jpg thumbnail for example):


{
url:"' . $moviepath . '",
autoPlay: '.$autoplay.',
autoBuffering: true,
}

I edited them all to read:


{
url:"' . $moviepath . '",
autoPlay: '.$autoplay.',
autoBuffering: true,
scaling: "orig"
}

Presto, all done.

It’s ugly, and the more elegant way would be to make a new option in the plugin settings to set this to a user-defined value… but that’s the developer’s job, not mine! :P

Possibly related posts:

  1. Installing Azureus on my server
  2. ‘Related’ posts plugin
  3. New Gallery (almost) fully functional
  4. Adobe Premiere Elements – Project settings problem
  5. Site Updates

3 Comments to “Zenphoto & Flowplayer aspect ratio issue”


  1. It is always more helpful if you let us know about something like this on our forum or ticket system… We will add an option for that though. (Btw, the aspect ration for the THUMBNAIL aka slash image makes sense…)

    1
  2. Wow, here’s a dev really devoted to his project, found me on my own little blog… :)

    That’s service!

    Thanks for adding the feature. And re: the thumbnail does make sense – I just meant it would make sense to have an option for the video, too. I think I missed coding, which is why I poked around in the source rather than submitting a ticket.

    Anyway, I’m just glad the rest of the world will benefit from my little complaint. :) Keep up the great work on zenphoto, I really do love the project.

    2
  3. Well, we search the web from time to time to see what people write about our little project…:-)

    3


  • About

    I am a Family Physician in Southern Ontario with an overindulgent geeky side!
    About the Site
    Bio

  • Tweets

  • Meta