compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (42)

View Page History

{zone-data:component-name}
Zend_Service_ZendTube Zend_Video
{zone-data}


{zone-data:overview}
Zend_Service_ZendTube is a class that manage videos from YouTube,DailyMotion,MetaCafe,Vimeo.
Zend_Video is a class that manage videos from YouTube,DailyMotion,MetaCafe,Vimeo.The main purpose of this class is to manage videos from these
{zone-data}


{zone-data:operation}
Zend_Service_ZendTube Zend_Video will allow a developer an easy interaction with videos from YouTube,DailyMotion,MetaCafe,Vimeo.
{zone-data}

{zone-data:milestones}

*MileStone1:write unit tests
*MileStone2:write code
*MileStone3:write documentation
{zone-data}

{zone-data:class-list}
* Zend_Service_ZendTube Zend_Video
{zone-data}

Youtube Video Player.
{code:php}
$zend=new Zend_Service_ZendTube(); Zend_Video();
echo $zend->YouTubePlayer(10,13,330,223,"http://www.youtube.com/watch?v=r_8ydghbGSg");
{code}
DailyMotion Video Player.
{code:php}
$zend=new Zend_Service_ZendTube(); Zend_Video();
echo $zend->DailyMotionPlayer(10,13,330,223,"http://www.dailymotion.com/video/xda8rh_yyyy-yyyyyyyyyy_sport");
{code}
MetaCafe Video Player.
{code:php}
$zend=new Zend_Service_ZendTube(); Zend_Video();
echo $zend->MetaCafePlayer(10,13,330,23,"http://www.metacafe.com/watch/7237750/paok_tottenham/");
{code}
Vimeo Video Player.
{code:php}
$zend = new Zend_Service_ZendTube(); Zend_Video();
echo $zend->VimeoPlayer(350,13,350,223,"http://vimeo.com/34833642");
{code}
* @author Angelos Staboulis
*/
class Zend_Service_ZendTube Zend_Video {

/**YouTube Video Player**/
$createurl=null;
if(!empty($url)){
$first=strpos($url,'=');
$last=strpos($url,'&');
if($last!=false){
$createurl=substr($url,$first+1,$last-($first+1));
}
else
{
$createurl=substr($url,$first+1,strlen($url)-($first+1));
}
$src="http://www.youtube.com/v/".$createurl;
$style="'position:fixed;margin-left:$left"."px".";margin-top:$top"."px;"."margin-right:$width"."px;"."margin-bottom:$height"."px;"."'";
$urlvideo="<object>".
"<embed style=$style src=$src type=application/x-shockwave-flash></embed>".
"</object>";
}
return $urlvideo;
$createurl=null;
if(!empty($url)){
$newurl=strstr($url,"watch");
$first=strpos($newurl,"/");
$last=strrpos($newurl,"/");
$createurl=substr($newurl,$first+1,$last-($first+1)).".swf";
$src="http://www.metacafe.com/fplayer/".$createurl;
$style="'position:fixed;margin-left:$left"."px".";margin-top:$top"."px;"."margin-right:$width"."px;"."margin-bottom:$height"."px;"."'";
$urlvideo="<object>".
"<embed style=$style src=$src type=application/x-shockwave-flash></embed>".
"</object>";
$first=strrpos($url,'/');
$last=strpos($url,'#');
if($last!=false){
$createurl=substr($url,$first+1,$last-($first+1));
}
else
{
$createurl=substr($url,$first+1,strlen($url)-($first+1));
}
$src="http://www.dailymotion.com/swf/".$createurl;
$style="'position:fixed;margin-left:$left"."px".";margin-top:$top"."px;"."margin-right:$width"."px;"."margin-bottom:$height"."px;"."'";
$urlvideo="<object>".
} "<embed style=$style src=$src type=application/x-shockwave-flash></embed>".
$src="http://www.dailymotion.com/swf/".$createurl; "</object>";
$style="'position:fixed;margin-left:$left"."px".";margin-top:$top"."px;"."margin-right:$width"."px;"."margin-bottom:$height"."px;"."'";
$urlvideo="<object>".
"<embed style=$style src=$src type=application/x-shockwave-flash></embed>".
"</object>";
}
return $urlvideo;
}
$style="'position:fixed;margin-left:$left"."px".";margin-top:$top"."px;"."margin-right:$width"."px;"."margin-bottom:$height"."px;"."'";
$urlvideo="<object>".
"<embed style=$style src=$src type=application/x-shockwave-flash></embed>".
"</object>";
}
return $urlvideo;