View Single Post
Old 02-09-2012, 08:12 PM  
Dirty Dane
Sick Fuck
 
Dirty Dane's Avatar
 
Industry Role:
Join Date: Feb 2004
Location: www
Posts: 9,491
The best way is to only auto-resize the height relative to your default width (to keep same aspect ratio), and with the flash always sticked to the top of the cell. That way you can keep the same width, and whatever you wrap on left/right side of the player will stay at the same place. Otherwise, it could get messy.

To do this you need to tell the player to read the metadata from the video file and then calculate the height relative to the width. Using jQuery and in Flowplayer with 640 pixels width, additional custom code in the javascript will look like this within the clip: {
Code:
scaling: "fit",
  onStart: function(clip) { 
    var wrap = jQuery(this.getParent()); 
    wrap.css({height: (640*(clip.metaData.height/clip.metaData.width)), width: 640});
}
}


If you have banners, links or other content beneath the flashplayer, that will also be automatically pushed/pulled up and down together with the player as long you code it within the same cell

Last edited by Dirty Dane; 02-09-2012 at 08:15 PM..
Dirty Dane is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote