I have created a view to show the latest video added. I icluded the title and the video field.

Everything works but I am unable to customize the size of the video for the view block.

How can I customize the video, similar to how I customize the size of images using image cache?

Comments

doors’s picture

Can someone please answer!

doors’s picture

I got the file to play by putting the file name within the swf function.


	print swf('How to Taste Wine.flv', array('params' => array('width' => '300', 'height' => '260')));

But how do I get the filename automatically?

The following is the default theme and I used print_r() to look through the variables and objects that this theme supplies but none of them have the filename of the flash file included:

// $Id: views-view-field.tpl.php,v 1.1 2008/05/16 22:22:32 merlinofchaos Exp $
 /**
  * This template is used to print a single field in a view. It is not
  * actually used in default Views, as this is registered as a theme
  * function which has better performance. For single overrides, the
  * template is perfectly okay.
  *
  * Variables available:
  * - $view: The view object
  * - $field: The field handler object that can process the input
  * - $row: The raw SQL result that can be used
  * - $output: The processed output that will normally be used.
  *
  * When fetching output from the $row, this construct should be used:
  * $data = $row->{$field->field_alias}
  *
  * The above will guarantee that you'll always get the correct data,
  * regardless of any changes in the aliasing that might happen if
  * the view is modified.
  */

print $output;

AlexanderPop’s picture

Just create a text field in CCK for your content type. Not a file field. Then write the link as SWF input code..

swf file="yourfile.swf" params="height=320&&width=240"
Using the default text format option in views..

Stuart Greenfield’s picture

Status: Active » Needs review

This is easy with the new Views integration and profiles (#581470: Playlist option in file handlers). Create a profile that has the player you want in the size you want. Then create a view to pull through the file(s) that you want, set the style as SWF Tools, and choose the profile that you made to handle the results.

Hey presto, instant block or page!