I'm using mediafront with CCK. I wonder whether/how it would be possible to define a poster image for a video.

Comments

Basstunes’s picture

Version: 6.x-1.x-dev » 6.x-1.0-beta1

Sorry, just changed version to beta 1. My mistake.

travist’s picture

Status: Active » Fixed

You can do this very easily by just using the ImageField + FileField and then just upload an Image to your node. The player should pick it up and show it in the player.

Basstunes’s picture

Thanks for answering! I'll give it a try!

yannickoo’s picture

Status: Fixed » Active

Then I get this error

warning: Attempt to assign property of non-object in /home/xxx/public_html/drupal-6.16/sites/all/modules/mediafront/mediafront.module on line 496.

yannick

yannickoo’s picture

function mediafront_array_replace_recursive( $toArray, $fromArray ) {
   // Loop through array key/value pairs
   foreach ($fromArray as $key => $value) {
      // Value is an array
      if (is_array($value)) {
         // Traverse the array; replace or add result to original array
         $toArray[$key] = mediafront_array_replace_recursive($toArray[$key], $fromArray[$key]);
      }
      // Value is not an array
      else {
         // Replace or add current value to original array
#469 →     $toArray->{$key} = $value;
      }
   }

   // Return the joined array
   return $toArray;
} 
mstrelan’s picture

Worked for me. An issue that I have is that I might have more than one Imagefield on my content type. How does mediafront determine which one to use. If I use a multiple imagefield it seems to use whichever image is last in the array. Should I create an imagefield called "poster image" which only allows one image?

yannickoo’s picture

Status: Active » Closed (duplicate)
digitalfrontiersmedia’s picture

Overriding CSS with something akin to:

#mediaplayer_preview
{
  background-color: transparent;
}

will reveal the first frame of the video as the preview image. Code above used on a Mac in Safari with the simpleblack player template and a .m4v that appears in a video tag. YMMV.