Skip to content

Commit 69460d1

Browse files
committed
removing vid_player function
1 parent f9ba16e commit 69460d1

File tree

1 file changed

+0
-42
lines changed

1 file changed

+0
-42
lines changed

src/helpers.php

-42
Original file line numberDiff line numberDiff line change
@@ -150,48 +150,6 @@ function proxify_url($url, $base_url = ''){
150150
return app_url().'?q='.url_encrypt($url);
151151
}
152152

153-
function vid_player($url, $width, $height, $extension = false){
154-
155-
$path = parse_url($url, PHP_URL_PATH);
156-
157-
$html5 = false;
158-
159-
if($path){
160-
161-
$extension = $extension ? $extension : pathinfo($path, PATHINFO_EXTENSION);
162-
163-
if($extension == 'mp4' || $extension == 'webm' || $extension == 'ogg'){
164-
$html5 = true;
165-
}
166-
}
167-
168-
// this better be an absolute url
169-
$video_url = proxify_url($url);
170-
171-
if($html5){
172-
173-
$html = '<video width="100%" height="100%" controls autoplay>
174-
<source src="'.$video_url.'" type="video/'.$extension.'">
175-
Your browser does not support the video tag.
176-
</video>';
177-
178-
} else {
179-
180-
// encode before embedding it into player's parameters
181-
$video_url = rawurlencode($video_url);
182-
183-
$html = '<object id="flowplayer" width="'.$width.'" height="'.$height.'" data="//releases.flowplayer.org/swf/flowplayer-3.2.18.swf" type="application/x-shockwave-flash">
184-
185-
<param name="allowfullscreen" value="true" />
186-
<param name="wmode" value="transparent" />
187-
<param name="flashvars" value=\'config={"clip":"'.$video_url.'", "plugins": {"controls": {"autoHide" : false} }}\' />
188-
189-
</object>';
190-
}
191-
192-
return $html;
193-
}
194-
195153
function rel2abs($rel, $base)
196154
{
197155
if (strpos($rel, "//") === 0) {

0 commit comments

Comments
 (0)