var agent = navigator.userAgent.toLowerCase(); var is_iphone = (agent.indexOf('iphone')!=-1); var is_ipad = (agent.indexOf('ipad')!=-1); var is_playstation = (agent.indexOf('playstation')!=-1); var is_safari = (agent.indexOf('safari')!=-1); var is_iemobile = (agent.indexOf('iemobile')!=-1); var is_blackberry = (agent.indexOf('blackberry')!=-1); var is_android = (agent.indexOf('android')!=-1); var is_webos = (agent.indexOf('webos')!=-1);
if (is_iphone) { html5_jwplayer();} else if (is_ipad) { html5_jwplayer(); } else if (is_android) { check_android(); } else if (is_webos) { rtspPlayer(); } else if (is_blackberry) { rtspPlayer(); } else if (is_iemobile) { html5_jwplayer(); } else if (is_playstation) { html5_jwplayer(); } else { html5_jwplayer(); }
function check_android() {
var sCheckVersion = navigator.userAgent;
var version = sCheckVersion.match(/Android\s+([\d\.]+)/)[1];
var fVer = parseFloat(version);
if (fVer < 6.0) { rtspPlayer(); } else { window.location.href = "http://streaming01.retesrl.biz/live_gesured/gesured.stream/playlist.m3u8"; } } function html5_jwplayer() { jwplayer('videobox').setup({ 'id': 'test_video', 'provider': 'rtmp', 'streamer': 'rtmp://streaming01.retesrl.biz/live_gesured', 'file': 'gesured.stream', 'width': '800', 'height': '450', 'autostart': 'true', 'modes': [ { type: 'flash', src: '/jwplayer/player.swf' }, { type: 'html5', config: { 'provider': 'video', 'file': 'http://streaming01.retesrl.biz/live_gesured/gesured.stream/playlist.m3u8' } } ] }); } function rtspPlayer() { var player=document.getElementById("videobox"); player.innerHTML=''+ ''+ ''; }