Exemplo n.º 1
0
 /**
  *
  *
  * @return $embedvideo specific embeded code to play the video
  */
 public function getViewHTML($videoId, $videoWidth, $videoHeight)
 {
     if (!$videoId) {
         $videoId = $this->videoId;
     }
     $this->videoId = $videoId;
     $xmlContent = CRemoteHelper::getContent($this->getFeedUrl());
     $pattern = "'<link rel=\"video_src\"(.*?)\\/>'s";
     preg_match_all($pattern, $xmlContent, $matches);
     if ($matches) {
         $pattern = "'href=\"(.*?)\"'s";
         preg_match_all($pattern, $matches[1][0], $matches);
         $videoUrl = rawurldecode($matches[1][0]);
     }
     return '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' . $videoWidth . '" height="' . $videoHeight . '" id="viddler"><param name="movie" value="' . CVideosHelper::getIURL($videoUrl) . '" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><param name="wmode" value="transparent"/><embed src="' . CVideosHelper::getIURL($videoUrl) . '" width="' . $videoWidth . '" height="' . $videoHeight . '" type="application/x-shockwave-flash" allowScriptAccess="always" allowFullScreen="true" name="viddler" wmode="transparent"></embed></object>';
 }
Exemplo n.º 2
0
 /**
  *
  *
  * @return $embedvideo specific embeded code to play the video
  */
 public function getViewHTML($videoId, $videoWidth, $videoHeight)
 {
     if (!$videoId) {
         $videoId = $this->videoId;
     }
     $file = 'http://media.photobucket.com/video/' . CString::str_ireplace(" ", "%20", $videoId);
     $xmlContent = CRemoteHelper::getContent($file);
     if ($xmlContent == FALSE) {
         return false;
     }
     $pattern = "'<link rel=\"video_src\" href=\"(.*?)\" \\/>'s";
     preg_match_all($pattern, $xmlContent, $matches);
     if ($matches) {
         $videoUrl = rawurldecode($matches[1][0]);
     }
     $embedCode = '<embed width="' . $videoWidth . '" height="' . $videoHeight . '" type="application/x-shockwave-flash" wmode="transparent" src="' . CVideosHelper::getIURL($videoUrl) . '">';
     return $embedCode;
 }
Exemplo n.º 3
0
 /**
  *
  *
  * @return $embedvideo specific embeded code to play the video
  */
 public function getViewHTML($videoId, $videoWidth, $videoHeight)
 {
     if (!$videoId) {
         $videoId = $this->videoId;
     }
     $videoId = explode("/", $videoId);
     $embedCode = '<object width="' . $videoWidth . '" height="' . $videoHeight . '" data="' . CVideosHelper::getIURL('http://flash.revver.com/player/1.0/player.swf?mediaId=' . $videoId[0]) . '" type="application/x-shockwave-flash" id="revvervideo' . $videoId[0] . '"><param name="Movie" value="' . CVideosHelper::getIURL('http://flash.revver.com/player/1.0/player.swf?mediaId=' . $videoId[0]) . '"></param><param name="wmode" value="transparent"/></param><param name="AllowFullScreen" value="true"></param><param name="AllowScriptAccess" value="always"></param><embed type="application/x-shockwave-flash" src="' . CVideosHelper::getIURL('http://flash.revver.com/player/1.0/player.swf?mediaId=' . $videoId[0]) . '" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="always" flashvars="allowFullScreen=true" allowfullscreen="true" height="' . $videoHeight . '" width="' . $videoWidth . '" wmode="transparent"></embed></object>';
     return $embedCode;
 }
Exemplo n.º 4
0
 /**
  * Get video's thumbnail
  *
  * @access 	public
  * @param 	videoid
  * @return url
  */
 public function getThumbnail()
 {
     $thumbnail = '';
     // Store thumbnail
     $pattern = "'<meta name=\"embed_video_thumb_url\" content=\"(.*?)\"( \\/)?(>)'s";
     preg_match_all($pattern, $this->xmlContent, $matches);
     if ($matches) {
         $thumbnail = $matches[1][0];
     }
     return CVideosHelper::getIURL($thumbnail);
 }
Exemplo n.º 5
0
 /**
  *
  *
  * @return $embedvideo specific embeded code to play the video
  */
 public function getViewHTML($videoId, $videoWidth, $videoHeight)
 {
     if (!$videoId) {
         $videoId = $this->videoId;
     }
     $videoId = explode("/", $videoId);
     $xmlContent = CRemoteHelper::getContent('http://xml.truveo.com/apiv3?appid=1x1jhj64466mi12ia&method=truveo.videos.getVideos&query=' . $videoId[2]);
     $parser = JFactory::getXMLParser('Simple');
     $parser->loadString($xmlContent);
     $videoElement = $parser->document;
     //get Video embed code
     $element = $videoElement->getElementByPath('videoset/video/videoresultembedtag');
     $embedTag = $element->data();
     $pattern = "'src=\"(.*?)\"'s";
     preg_match_all($pattern, $embedTag, $matches);
     if ($matches) {
         $flashUrl = ' src="' . rawurldecode($matches[1][0]) . '" ';
         $src = $matches[1][0];
     }
     // 		$pattern	=  "'FlashVars=\'(.*?)\''s";
     // 		$pattern	= '';
     // 		preg_match_all($pattern, $embedTag, $matches);
     // 		if(!empty($matches))
     // 		{
     // 			echo JUtility::dump($matches);
     // 			echo count($matches);
     // 			exit;
     // 			$flashVar = ' FlashVars=\''.rawurldecode($matches[1][0]).'\' ';
     // 		}
     //		$embedCode	= "<embed ".$flashUrl.$flashVar." allowFullScreen='true' width='".$videoWidth."' height='".$videoHeight."' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' allowScriptAccess='always'></embed>";
     $embedCode = "<embed flashvars='fs=1' allowfullscreen='true' src='" . CVideosHelper::getIURL($src) . "' type='application/x-shockwave-flash' width='{$videoWidth}' height='{$videoHeight}' wmode='transparent'></embed>";
     return $embedCode;
 }
Exemplo n.º 6
0
 /**
  * Get video's thumbnail URL from videoid
  *
  * @access 	public
  * @param 	videoid
  * @return url
  */
 public function getThumbnail()
 {
     $thumbnail = '';
     $pattern = "'<img src=\"(.*?)\"'s";
     preg_match_all($pattern, $this->data, $matches);
     if ($matches) {
         $thumbnail = trim($matches[1][0]);
     }
     return CVideosHelper::getIURL($thumbnail);
 }
Exemplo n.º 7
0
 /**
  * Get video's thumbnail URL from videoid
  *
  * @access 	public
  * @param 	videoid
  * @return url
  */
 public function getThumbnail()
 {
     return CVideosHelper::getIURL('http://img.youtube.com/vi/' . $this->getId() . '/default.jpg');
 }
Exemplo n.º 8
0
 /**
  *
  *
  * @return $embedvideo specific embeded code to play the video
  */
 public function getViewHTML($videoId, $videoWidth, $videoHeight)
 {
     if (!$videoId) {
         $videoId = $this->videoId;
     }
     $xmlContent = CRemoteHelper::getContent('http://www.flickr.com/photos/' . $videoId);
     $pattern = "'<link rel=\"video_src\" href=\"(.*?)\"( \\/)?(>)'s";
     preg_match_all($pattern, $xmlContent, $matches);
     if ($matches) {
         $videoUrl = rawurldecode($matches[1][0]);
     }
     return '<embed width="' . $videoWidth . '" height="' . $videoHeight . '" wmode="transparent" allowFullScreen="true" type="application/x-shockwave-flash" src="' . CVideosHelper::getIURL($videoUrl) . '"/>';
 }
Exemplo n.º 9
0
 /**
  *
  *
  * @return $embedCode specific embeded code to play the video
  */
 public function getViewHTML($videoId, $videoWidth, $videoHeight)
 {
     $videoId = !empty($videoId) ? $videoId : $this->url;
     $xmlContent = CRemoteHelper::getContent('http://www.mtv.com/videos/' . $videoId);
     $videoPath = explode('/', $videoId);
     if ($xmlContent == FALSE) {
         return false;
     }
     // Get Embeded Code
     $pattern = "/http:\\/\\/media.mtvnservices.com\\/mgid:uma:(.*?)\"/i";
     preg_match_all($pattern, $xmlContent, $matches);
     if ($matches[1][0]) {
         $path = $matches[1][0];
         $getId = explode(':', $matches[1][0]);
     }
     if ($getId[0] == 'video') {
         $flashVars = 'flashVars="configParams=vid=' . $getId[2];
     } else {
         $id = explode('=', $videoPath[2]);
         $flashVars = $videoPath[0] == 'movie-trailers' ? NULL : 'flashVars="configParams=id=' . $id[1] . '"';
     }
     $embedCode = '<embed src="' . CVideosHelper::getIURL('http://media.mtvnservices.com/mgid:uma:' . $path) . '" width="' . $videoWidth . '" height="' . $videoHeight . '" ' . $flashVars . '" type="application/x-shockwave-flash" allowFullScreen="true" allowScriptAccess="always" base="." wmode="transparent"></embed>';
     return $embedCode;
 }
Exemplo n.º 10
0
    /**
     *
     *
     * @return $embedvideo specific embeded code to play the video
     */
    public function getViewHTML($videoId, $videoWidth, $videoHeight)
    {
        //$config = CFactory::getConfig();
        if (!$videoId) {
            $videoId = $this->getId();
        }
        $html = '';
        //if($config->get('use_youtube_iframe_embed'))
        if (true) {
            // Use new iframe embed method
            $html = '<iframe class="youtube-player" type="text/html" width="' . $videoWidth . '" height="' . $videoHeight . '" src="' . CVideosHelper::getIURL("http://www.youtube.com/embed/" . $videoId) . '" frameborder="0">
				</iframe>';
        } else {
            $html = "<embed src=\"" . CVideosHelper::getIURL("http://www.youtube.com/v/" . $videoId . "&hl=en&fs=1&hd=1&showinfo=0&rel=0") . "\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"" . $videoWidth . "\" height=\"" . $videoHeight . "\" wmode=\"transparent\"></embed>";
        }
        return $html;
    }
Exemplo n.º 11
0
 /**
  * Get video's thumbnail URL from videoid
  *
  * @access 	public
  * @param 	videoid
  * @return url
  */
 public function getThumbnail()
 {
     $thumbnail = '';
     $pattern = '/og:image"\\s+content="([^"]+)"/i';
     preg_match($pattern, $this->xmlContent, $matches);
     if ($matches) {
         $thumbnail = $matches[1];
     }
     return CVideosHelper::getIURL($thumbnail);
 }
Exemplo n.º 12
0
 public function getThumbnail()
 {
     $thumbnail = '';
     $pattern = "'thmb_url\":\"(.*?)\"'s";
     preg_match_all($pattern, $this->xmlContent, $matches);
     $thumbnail = !isset($matches[1][0]) ? '' : stripslashes($matches[1][0]);
     if ($thumbnail == '') {
         $pattern = "'<meta property=\"og:image\" content=\"(.*?)\"'s";
         preg_match_all($pattern, $this->xmlContent, $matches);
         if ($matches && !empty($matches[1][0])) {
             $thumbnail = urldecode($matches[1][0]);
         }
     }
     return CVideosHelper::getIURL($thumbnail);
 }
Exemplo n.º 13
0
 /**
  *
  *
  * @return $embedvideo specific embeded code to play the video
  */
 public function getViewHTML($videoId, $videoWidth, $videoHeight)
 {
     if (!$videoId) {
         $videoId = $this->videoId;
     }
     $embedCode = '<iframe src="' . CVideosHelper::getIURL('http://www.dailymotion.com/embed/video/' . $videoId) . '" width="' . $videoWidth . '" height="' . $videoHeight . '" frameborder="0"></iframe>';
     return $embedCode;
 }
Exemplo n.º 14
0
 /**
  *
  *
  * @return $embedvideo specific embeded code to play the video
  */
 public function getViewHTML($videoId, $videoWidth, $videoHeight)
 {
     $id = explode('-', $videoId);
     $id = $id[count($id) - 1];
     $embedCode = !ctype_digit($id) ? '<object type="application/x-shockwave-flash" data="https://s.yimg.com/rx/fbp/3/player.swf?region=US&amp;site=movies&amp;onet=false&amp;version=10.2.0&amp;allowScriptAccess=always&amp;allowNetworking=all&amp;allowFullscreen=true&amp;ise=false&amp;pv=1&amp;pgsid=2143413669&amp;yvapaid=167&amp;uuid=' . $videoId . '" height="' . $videoHeight . '" width="' . $videoWidth . '" id="' . $videoId . '"> </object>' : '<iframe width="' . $videoWidth . '" height="' . $videoHeight . '" scrolling="no" frameborder="0" src="' . CVideosHelper::getIURL('http://screen.yahoo.com/' . $videoId . '.html?format=embed&player_autoplay=false') . '"></iframe>';
     return $embedCode;
 }
Exemplo n.º 15
0
 /**
  *
  *
  * @return $embedCode specific embeded code to play the video
  */
 public function getViewHTML($videoId, $videoWidth, $videoHeight)
 {
     if (!$videoId) {
         $videoId = $this->videoId;
     }
     return "<embed id=\"VideoPlayback\" src=\"" . CVideosHelper::getIURL("http://video.google.com/googleplayer.swf?docid=" . $videoId . "&hl=en&fs=true") . "\" style=\"width:" . $videoWidth . "px;height:" . $videoHeight . "px\" allowFullScreen=\"true\" allowScriptAccess=\"always\" type=\"application/x-shockwave-flash\" wmode=\"transparent\"> </embed>";
 }
Exemplo n.º 16
0
 /**
  *
  *
  * @return $embedCode specific embeded code to play the video
  */
 public function getViewHTML($videoId, $videoWidth, $videoHeight)
 {
     if (!$videoId) {
         $videoId = $this->videoId;
     }
     $embedCode = '<iframe src="' . CVideosHelper::getIURL('http://player.vimeo.com/video/' . $videoId) . '" width="' . $videoWidth . '" height="' . $videoHeight . '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
     return $embedCode;
 }
Exemplo n.º 17
0
 /**
  *
  *
  * @return $embedvideo specific embeded code to play the video
  */
 public function getViewHTML($videoId, $videoWidth, $videoHeight)
 {
     if (!$videoId) {
         $videoId = $this->videoId;
     }
     $remoteFile = 'http://blip.tv/file/' . $videoId . '?skin=rss';
     $xmlContent = CRemoteHelper::getContent($remoteFile);
     // get embedFile
     $pattern = "'<blip:embedLookup>(.*?)<\\/blip:embedLookup>'s";
     $embedFile = '';
     preg_match_all($pattern, $xmlContent, $matches);
     if ($matches) {
         $embedFile = $matches[1][0];
     }
     return '<iframe src="' . CVideosHelper::getIURL('http://blip.tv/play/' . $embedFile . '.x?p=1') . '" width="' . $videoWidth . '" height="' . $videoHeight . '" frameborder="0" allowfullscreen></iframe><embed type="application/x-shockwave-flash" src="' . CVideosHelper::getIURL('http://a.blip.tv/api.swf#' . $embedFile) . '" style="display:none"></embed>';
 }
Exemplo n.º 18
0
 /**
  *
  *
  * @return $embedvideo specific embeded code to play the video
  */
 public function getViewHTML($videoId, $videoWidth, $videoHeight)
 {
     if (!$videoId) {
         $videoId = $this->videoId;
     }
     return '<iframe width="' . $videoWidth . '" height="' . $videoHeight . '" src="' . CVideosHelper::getIURL('http://www.liveleak.com/ll_embed?i=' . $videoId) . '" frameborder="0" allowfullscreen></iframe>';
 }