
using rtmp an hls
I'm using Apache, nginx, ffmpeg and phpvibe CMS for a streaming website.
So when the device is mobile, it will load the http provider, or else is the rtmp.
I did put two different videos, but I can't find the solution to integrate or modify the phpvibe's code to do this
This is the jwplayer's code on phpvibe public function _jwplayer6 ($file,$thumb, $logo = null, $type=null) { global $video;
Code: [Select]
$embed = '<div id="video-setup" class="full">' . _lang("Loading the player...") . '</div>';
$embed .= ' <script type="text/javascript">
jwplayer("video-setup").setup({ primary : "html5", file: ***"' . $file . '",*** image: "' . $thumb . '", modes: [
{ type: "html5" },
{ type: "flash", src: "' . site_url() . 'lib/players/jwplayer/player.swf" }
], stretching: "uniform", height: ' . $this->height . ', repeat: "always", width: "100%"';
I try to do this
Code: [Select]
$embed .= '<script type="text/javascript" src="//wurfl.io/wurfl.js"></script><script type="text/javascript">
if(WURFL.is_mobile){
var SourcesConteneuse = "http'.substr($file,4).'";
}else{
var SourcesConteneuse = "rtmp'.substr($file,4).'";
}
jwplayer("video-setup").setup({ primary : "html5", file : SourcesConteneuse , image : "' . $thumb . '", modes: [
{ type: "html5" },
but unfortunately jwplayer failed to load rtmp on desktops, but mobile load http
I checked the nginx and rtmp server and seems alright
So I need your help to find the correct code