live on;
hls on;
hls_path /tmp/hls/office1/;
exec_pull ffmpeg -i rtsp://admin:admin@0.0.0.0/cam/realmonitor?channel=01&subtype=00 -c copy -f flv -an rtmp://localhost:1935/office1/stream 2>>/usr/rtmp/office.log;
<script type="text/javascript">
jwplayer("container1").setup({
sources: [ {
file: "rtmp://10.10.10.10:1935/office1/stream"
},
{
file: "http://10.10.10.10/hls/office1/stream.m3u8"
} ],
});
</script>
<div id="videoplayer1" style="width:480px;height:270px;">
<script type="text/javascript">
var ua = navigator.userAgent.toLowerCase();
var flashInstalled = false;
if (typeof(navigator.plugins)!="undefined" && typeof(navigator.plugins["Shockwave Flash"])=="object") {
flashInstalled = true;
} else if (typeof window.ActiveXObject != "undefined") {
try {
if (new ActiveXObject("ShockwaveFlash.ShockwaveFlash")) {
flashInstalled = true;
}
} catch(e) {};
};
if(ua.indexOf("iphone") != -1 || ua.indexOf("ipad") != -1 || (ua.indexOf("android") != -1 && !flashInstalled)){
// HTML5
this.videoplayer1 = new Uppod({m:"video",uid:"videoplayer1",comment:"Улица ночью",file:"http://1.2.3.4/hls/cam/stream.m3u8",st:"uppodvideo"});
}else{
if(!flashInstalled){
// NO FLASH
document.getElementById("videoplayer1").innerHTML="<a href=http://www.adobe.com/go/getflashplayer>Требуется установить Flash-плеер</a>";
}else{
// FLASH
var flashvars = {"comment":"Улица ночью","st":"http://5.6.7.8/st/video248-69.txt","file":"rtmp://1.2.3.4/cam/stream"};var params = {wmode:"transparent", allowFullScreen:"true", allowScriptAccess:"always",id:"videoplayer1"}; new swfobject.embedSWF("http://5.6.7.8/player/uppod.swf", "videoplayer1", "960", "576", "9.0.115.0", false, flashvars, params);
}