Email conversation
From | Michael Ennis |
To | Me |
Subject | Using PerfectPopups with video files |
Date | 9 May 2007 23:58 |
Hey There,
Thanks for what looks like a very cool script. I have an environment where
I have a list of videos on a page with high and lo res versions for each
video. The page is populated from a mysql db using php and basically, the
video name and the path to each version of the video are stored in separate
fields in the db. I'd love to be able to integrate your script but I can't
get a grasp on how I might do it from your instruction page.
Any thoughts?
Thx!
Mike
From | Me |
To | Michael Ennis |
Subject | Re: Using PerfectPopups with video files |
Date | 10 May 2007 20:07 |
Mike,
> The page is populated from a mysql db using php and basically, the
> video name and the path to each version of the video are stored in separate
> fields in the db. I'd love to be able to integrate your script but I can't
> get a grasp on how I might do it from your instruction page.
Well, the script cannot integrate in any reliable way with the plugins
themselves, so it cannot work out how big the plugin wants to to be. So
there is one extra requirement; your database must also contain the heights
and widths of the videos. If it can do that, then this is easy.
Simply put your video's object/embed tags inside a div that you position
absolutely at 0,0. Make the height and width of the div be the same as the
height and width of the video (generate it with PHP). Also make it
overflow:hidden; so that you don't get any baseline alignment problems. Open
the page in a popup, then use the version of the script called "Resizing the
inside of the current window" as a script inside the popup - run it onload,
or just before the </body> tag.
Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/