53 $urlInfo = @parse_url($url);
54 if ($urlInfo === FALSE) {
58 if (!isset($urlInfo[
'host'])) {
59 $urlInfo = @parse_url(
'http://' . $url);
61 if (empty($urlInfo[
'host'])) {
65 foreach ($this->providers as $provider) {
66 $functionName =
'process_' . $provider;
67 if (in_array($provider, $hostName) && is_callable(array($this, $functionName))) {
95 return $this->{$method}($url);
113 ^(?:https?://)? # Optional URL scheme Either http or https 114 (?:www\.)? # Optional www subdomain 115 (?: # Group host alternatives: 116 youtu\.be/ # Either youtu.be/, 117 |youtube(?: # or youtube.com/ 118 -nocookie # optional nocookie domain 120 [^/]+/.+/ # Either /something/other_params/ for channels, 121 |(?:v|e(?: # or v/ or e/, 122 mbed # optional mbed for embed/ 124 |.*[?&]v= # or ?v= or ?other_param&v= 126 ) # End host alternatives. 127 ([^"&?/ ]{11}) # 11 characters (Length of Youtube video ids). 128 (?:.+)?$ # Optional other ending URL parameters. 130 if (preg_match($pattern, $url, $matches)) {
131 $videoId = $matches[1];
135 $url = $this->
getUrlSchema() .
'www.youtube.com/v/' . $videoId .
'?fs=1';
157 $parts = explode(
'video/', $url);
158 $videoId = $parts[1];
159 if (strpos($videoId,
'/') !== FALSE) {
160 $videoId = substr($videoId, 0, strpos($videoId,
'/'));
162 return $this->
getUrlSchema() .
'www.dailymotion.com/swf/' . $videoId;
172 $parts = explode(
'/', $url);
173 $videoId = $parts[count($parts) - 1];
174 if (strpos($videoId,
'-') !== FALSE) {
175 $videoId = substr($videoId, 0, strpos($videoId,
'-'));
177 return 'http://de.sevenload.com/pl/' . $videoId .
'/400x500/swf';
192 if (preg_match(
'/[\\/#](\\d+)$/', $url, $matches)) {
193 $videoId = $matches[1];
194 $url = $this->
getUrlSchema() .
'vimeo.com/moogaloop.swf?clip_id=' . $videoId .
'&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&fullscreen=1';
206 if (preg_match(
'/video([^(\\&|$)]*)/', $url, $matches)) {
207 $parts = explode(
'/', $matches[1]);
208 $videoId = $parts[1];
209 $url =
'http://www.clipfish.de/cfng/flash/clipfish_player_3.swf?as=0&r=1&noad=1&fs=1&vid=' . $videoId;
221 if (preg_match(
'/docid=([^(\\&|$)]*)/', $url, $matches)) {
222 $videoId = $matches[1];
223 $url = $this->
getUrlSchema() .
'video.google.com/googleplayer.swf?docid=' . $videoId;
235 if (preg_match(
'/watch([^(\\&|$)]*)/', $url, $matches)) {
236 $parts = explode(
'/', $matches[1]);
237 $videoId = $parts[1];
238 $url =
'http://www.metacafe.com/fplayer/' . $videoId .
'/.swf';
250 preg_match(
'/watch([^(\\&|$)]*)/', $url, $matches);
251 $parts = explode(
'/', $matches[1]);
252 $videoId = $parts[1];
253 return $this->
getUrlSchema() .
'www.myvideo.de/movie/' . $videoId .
'/';
263 preg_match(
'/i=([^(\\&|$)]*)/', $url, $matches);
264 $videoId = $matches[1];
265 return 'http://www.liveleak.com/e/' . $videoId;
275 preg_match(
'/watch\\/([^(\\&|$)]*)/', $url, $matches);
276 $videoId = $matches[1];
277 return 'http://www.veoh.com/static/swf/webplayer/WebPlayer.swf?version=AFrontend.5.5.2.1001&permalinkId=' . $videoId;
286 return \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv(
'TYPO3_SSL') ?
'https://' :
'http://';
static trimExplode($delim, $string, $removeEmptyValues=FALSE, $limit=0)