1
votes

I am using Zend Framework to show photos from Picasa Web Albums. My questions is how to display videos if there is any in the album?

  foreach ($albumFeed as $albumEntry) {

    if ($albumEntry->getMediaGroup() != null) {

      $mediaArray = $albumEntry->getMediaGroup()->getContent();
      if (sizeof($mediaArray) > 1)  {
        foreach($mediaArray as $mediaEntry) {
          if ($mediaEntry->getMedium() == 'video')  {
            $media = 'video';
            $videoSrc = $mediaEntry->getUrl();
            break;
          }
        }
      }
    }
  }

The $videoSrc has the video link but how can I play the video?

I tried something like:

echo "<object width='400' height='255'\> <embed src='http://video.google.com/googleplayer.swf?videoUrl=$videoSrc' type='application/x-shockwave-flash' allowscriptaccess='always' width='410' height='255'></embed> </object>";

but it didn't work. Any idea?

Thank you

1
I'm pretty sure that Picasa video links expire after a short period of time, which means you can't. You could upload from Picasa to YouTube, but that's a pain if you're getting data from the API'sAshley
Thanks Ashley. They have an expiry date but I expect that I can play them right after I retrieve them from Picasa Web Albums.user215097

1 Answers

0
votes

You could try this code to display the video, but they will leave after 11 hours (-;

<object width="425" height="355">
    <param name="movie" 
           value="YOUR_VIDEO_URL">
    </param>

    <param name="wmode" 
           value="transparent">
    </param>

    <embed src="YOUR_VIDEL_URL" 
           type="application/x-shockwave-flash" 
           wmode="transparent" width="425" height="355">
    </embed>
</object>