function video_filter_streamhoster in Video Filter 5.2
Same name and namespace in other branches
- 6.3 video_filter.codecs.inc \video_filter_streamhoster()
- 6.2 video_filter.codecs.inc \video_filter_streamhoster()
- 7.3 video_filter.codecs.inc \video_filter_streamhoster()
1 string reference to 'video_filter_streamhoster'
File
- ./
video_filter.codecs.inc, line 247
Code
function video_filter_streamhoster($video) {
$video['source'] = 'http://public.streamhoster.com/Resources/Flash/JWFLVMediaPlayer/mediaplayer.swf';
$params = array(
'allowscriptaccess' => 'always',
);
$protocol = $video['codec']['matches'][1];
if ($protocol == 'rtmp') {
$params['flashvars'] = 'file=' . urlencode('/' . $video['codec']['matches'][4]);
$params['flashvars'] .= '&streamer=' . urlencode('rtmp://' . $video['codec']['matches'][2] . '.streamhoster.com/' . $video['codec']['matches'][3]);
$params['flashvars'] .= '&type=rtmp';
}
elseif ($protocol == 'http') {
$params[flashvars] = 'file=' . urlencode('http://' . $video['codec']['matches'][2] . '.streamhoster.com/' . $video['codec']['matches'][3] . '/' . $video['codec']['matches'][4]);
$params['flashvars'] .= '&type=video';
}
$params['flashvars'] .= '&width=' . $video['width'];
$params['flashvars'] .= '&height=' . $video['height'];
$params['flashvars'] .= !empty($video['autoplay']) ? '&autostart=true' : '&autostart=false';
return video_filter_flash($video, $params);
}