illusion1st
Создатель
- Регистрация
- 17 Апр 2014
- Сообщения
- 17
- Реакции
- 0
- Автор темы
- #11
да работает на локалке, в бд темплэйт хранится как
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "Для просмотра ссылки Войдиили Зарегистрируйся">
<html xmlns="Для просмотра ссылки Войдиили Зарегистрируйся">
<head id="hdInfo"><title>
</title>
</head>
<body style="margin:0; padding:0;">
<script type="text/javascript" src="/js/jquery.min.js" > </script>
<script type="text/javascript" src="/swfobject.js">
</script>
<div id="videodiv-live">
<noscript><a href="">Video Livestream</a>(Please enable javascript).</noscript>
</div>
<script type="text/javascript" src="/Player6/jwplayer.js" ></script>
<script type="text/javascript" src="jwplayer.js" ></script>
<script type="text/javascript">jwplayer.key="L4LIIFqJjUQeHk";</script>
<div id='hd'></div>
<script type='text/javascript'>
var js_rtsp = '<?=$rtsp?>';
var js_http = '<?=$http?>';
var js_rtmp = '<?php echo $rtmp1?>';
document.write('here is stream:' + js_rtmp);
width = "100%";
height = "100%";
rtsp = 'js_rtsp';
http = 'js_http';
rtmp = 'js_rtmp';
if (navigator.userAgent.indexOf("Android 4.") == -1 && navigator.userAgent.indexOf("iPhone") == -1 && navigator.userAgent.indexOf("iPad") == -1 && navigator.userAgent.indexOf("BB10") == -1 && swfobject.hasFlashPlayerVersion("9.0.115")) {
jwplayer('hd-livestream').setup({file: js_rtmp, width: $( document).width(), height: $( document).height(),
rtmp: {
securetoken: "232612b37d"
},
autostart: 'true'});
}
else {
//+++ iOS iPhone Code +++
if ( (navigator.userAgent.indexOf("iPhone") >= 0) || (navigator.userAgent.indexOf("iPod") >= 0) ) {
c = '<video width="'+width+'" height="'+height+'" controls autobuffer poster="'+image+'" source src="'+http+'/playlist.m3u8" type="video/mp4" />';
document.getElementById('videodiv-live').innerHTML=c;
}
//+++ iOS iPad Code +++
if (navigator.userAgent.indexOf("iPad") >= 0 ) {
c = '<video width="'+width+'" height="'+height+'" controls autobuffer poster="'+image+'" source src="'+http+'/playlist.m3u8" type="video/mp4" />';
document.getElementById('videodiv-live').innerHTML=c;
}
//+++ RIM Blackberry Code +++
if (navigator.userAgent.indexOf("BlackBerry") >= 0 ) {
c = '<a href="'+rtsp+'"><img width="'+width+'" height="'+(parseInt(width)/16*9)+'" src="/images/play.png" alt="Video abspielen (RTP/RTSP)"/> <\/a>';
document.getElementById('videodiv-live').innerHTML=c;
}
//+++ Android Code +++
if (navigator.userAgent.indexOf("Android") >= 0 ) {
c = '<a href="'+rtsp+'"><img width="'+width+'" height="'+(parseInt(width)/16*9)+'" src="/images/play.png" alt="Video (RTP/RTSP)"/> <\/a>';
document.getElementById('videodiv-live').innerHTML=c;
}
//Android 4 und Blackberry BB10 unterstьtzen HLS-Streaming (wie iOS)
//KFOT= Kindle Fire 7inch, KFTT = Kindle Fire HD 7", KFJWI & KFJWA = Kindle Fire HD 8.9", BB10 = BlackBerry z.B. Z10
if (navigator.userAgent.indexOf("Android 4.") >= 0 || navigator.userAgent.indexOf("Android 5.") >= 0 || navigator.userAgent.indexOf("KFOT") >= 0 || navigator.userAgent.indexOf("KFTT") >= 0 || navigator.userAgent.indexOf("KFJWI") >= 0 || navigator.userAgent.indexOf("KFJWA") >= 0 || navigator.userAgent.indexOf("BB10") >= 0 ) {
c = '<video controls width="'+width+'" height="'+height+'" poster="'+image+'" src="'+http+'/playlist.m3u8" />';
document.getElementById('videodiv-live').innerHTML=c;
}
}
</script>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "Для просмотра ссылки Войди
<html xmlns="Для просмотра ссылки Войди
<head id="hdInfo"><title>
</title>
</head>
<body style="margin:0; padding:0;">
<script type="text/javascript" src="/js/jquery.min.js" > </script>
<script type="text/javascript" src="/swfobject.js">
</script>
<div id="videodiv-live">
<noscript><a href="">Video Livestream</a>(Please enable javascript).</noscript>
</div>
<script type="text/javascript" src="/Player6/jwplayer.js" ></script>
<script type="text/javascript" src="jwplayer.js" ></script>
<script type="text/javascript">jwplayer.key="L4LIIFqJjUQeHk";</script>
<div id='hd'></div>
<script type='text/javascript'>
var js_rtsp = '<?=$rtsp?>';
var js_http = '<?=$http?>';
var js_rtmp = '<?php echo $rtmp1?>';
document.write('here is stream:' + js_rtmp);
width = "100%";
height = "100%";
rtsp = 'js_rtsp';
http = 'js_http';
rtmp = 'js_rtmp';
if (navigator.userAgent.indexOf("Android 4.") == -1 && navigator.userAgent.indexOf("iPhone") == -1 && navigator.userAgent.indexOf("iPad") == -1 && navigator.userAgent.indexOf("BB10") == -1 && swfobject.hasFlashPlayerVersion("9.0.115")) {
jwplayer('hd-livestream').setup({file: js_rtmp, width: $( document).width(), height: $( document).height(),
rtmp: {
securetoken: "232612b37d"
},
autostart: 'true'});
}
else {
//+++ iOS iPhone Code +++
if ( (navigator.userAgent.indexOf("iPhone") >= 0) || (navigator.userAgent.indexOf("iPod") >= 0) ) {
c = '<video width="'+width+'" height="'+height+'" controls autobuffer poster="'+image+'" source src="'+http+'/playlist.m3u8" type="video/mp4" />';
document.getElementById('videodiv-live').innerHTML=c;
}
//+++ iOS iPad Code +++
if (navigator.userAgent.indexOf("iPad") >= 0 ) {
c = '<video width="'+width+'" height="'+height+'" controls autobuffer poster="'+image+'" source src="'+http+'/playlist.m3u8" type="video/mp4" />';
document.getElementById('videodiv-live').innerHTML=c;
}
//+++ RIM Blackberry Code +++
if (navigator.userAgent.indexOf("BlackBerry") >= 0 ) {
c = '<a href="'+rtsp+'"><img width="'+width+'" height="'+(parseInt(width)/16*9)+'" src="/images/play.png" alt="Video abspielen (RTP/RTSP)"/> <\/a>';
document.getElementById('videodiv-live').innerHTML=c;
}
//+++ Android Code +++
if (navigator.userAgent.indexOf("Android") >= 0 ) {
c = '<a href="'+rtsp+'"><img width="'+width+'" height="'+(parseInt(width)/16*9)+'" src="/images/play.png" alt="Video (RTP/RTSP)"/> <\/a>';
document.getElementById('videodiv-live').innerHTML=c;
}
//Android 4 und Blackberry BB10 unterstьtzen HLS-Streaming (wie iOS)
//KFOT= Kindle Fire 7inch, KFTT = Kindle Fire HD 7", KFJWI & KFJWA = Kindle Fire HD 8.9", BB10 = BlackBerry z.B. Z10
if (navigator.userAgent.indexOf("Android 4.") >= 0 || navigator.userAgent.indexOf("Android 5.") >= 0 || navigator.userAgent.indexOf("KFOT") >= 0 || navigator.userAgent.indexOf("KFTT") >= 0 || navigator.userAgent.indexOf("KFJWI") >= 0 || navigator.userAgent.indexOf("KFJWA") >= 0 || navigator.userAgent.indexOf("BB10") >= 0 ) {
c = '<video controls width="'+width+'" height="'+height+'" poster="'+image+'" src="'+http+'/playlist.m3u8" />';
document.getElementById('videodiv-live').innerHTML=c;
}
}
</script>
</body>
</html>