播放 Picasa 相册中的视频
我正在使用 Zend Framework 显示 Picasa 网络相册中的照片。我的问题是如果相册中有视频如何显示?
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;
}
}
}
}
}
$videoSrc 有视频链接,但如何播放视频?
我尝试了类似的方法:
echo "";
但它不起作用。有什么想法吗?
谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试使用此代码来显示视频,但他们将在 11 小时后离开 (-;
You could try this code to display the video, but they will leave after 11 hours (-;