? asset_bonus/.svn Index: asset_bonus/INSTALL.txt =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/asset/asset_bonus/Attic/INSTALL.txt,v retrieving revision 1.1.2.1 diff -u -p -u -p -r1.1.2.1 INSTALL.txt --- asset_bonus/INSTALL.txt 19 Dec 2007 18:50:23 -0000 1.1.2.1 +++ asset_bonus/INSTALL.txt 4 Feb 2009 23:25:35 -0000 @@ -14,3 +14,6 @@ the asset_bonus folder resulting in a fi |--swfobject.js |--flvplayer.swf |--flvplayer.txt + +If the getid3 module and it's associated library are correctly installed and +set up, asset_bonus will use these to determing FLV video height and width. \ No newline at end of file Index: asset_bonus/asset_bonus.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/asset/asset_bonus/Attic/asset_bonus.module,v retrieving revision 1.1.2.20 diff -u -p -u -p -r1.1.2.20 asset_bonus.module --- asset_bonus/asset_bonus.module 4 Nov 2008 10:00:56 -0000 1.1.2.20 +++ asset_bonus/asset_bonus.module 4 Feb 2009 23:25:35 -0000 @@ -192,13 +192,25 @@ function asset_bonus_asset_formatter($op function asset_bonus_swfobject_options($asset) { require_once(drupal_get_path('module', 'asset_bonus') .'/swfheader/swfheader.class.php'); - $swf = new swfheader(); - $swf->getDimensions($asset->filepath); + $version = 6; + if ($asset->extension=="swf") { + $swf = new swfheader(); + $swf->getDimensions($asset->filepath); + $width = $swf->width; + $height = $swf->height; + $version = $swf->version; + } + else if ($asset->extension=="flv" && module_exists(getid3) && getid3_load()) { + $getid3 = getid3_instance(); + $getid3->Analyze($asset->filepath); + $width = $getid3->info['meta']['onMetaData']['width']; + $height = $getid3->info['meta']['onMetaData']['height']; + } $form['width'] = array( '#type' => 'textfield', '#title' => t('Width'), '#description' => t('Width in pixels'), - '#default_value' => !isset($_GET['width']) ? $swf->width : filter_xss($_GET['width']), + '#default_value' => !isset($_GET['width']) ? $width : filter_xss($_GET['width']), '#size' => 5, '#required' => true, ); @@ -206,14 +218,14 @@ function asset_bonus_swfobject_options($ '#type' => 'textfield', '#title' => t('Height'), '#description' => t('Height in pixels'), - '#default_value' => !isset($_GET['height']) ? $swf->height : filter_xss($_GET['height']), + '#default_value' => !isset($_GET['height']) ? $height : filter_xss($_GET['height']), '#size' => 5, '#required' => true, ); $form['version'] = array( '#type' => 'textfield', '#title' => t('Minimum Version'), - '#default_value' => $swf->version, + '#default_value' => $version, '#size' => 5, '#required' => true, );