diff --git a/lib/controller/getHistoryEvents.php b/lib/controller/getHistoryEvents.php index b1d7bef..1930304 100644 --- a/lib/controller/getHistoryEvents.php +++ b/lib/controller/getHistoryEvents.php @@ -18,7 +18,7 @@ foreach( $LREC as $REC ){ $CR['id'] = intval( $REC['id'] ); $CR['node_id'] = intval( $REC['node_id'] ); - $CR['node_name'] = $NodeNames[$CR['node_id']]; + $CR['node_name'] = 'koko';//$NodeNames[$CR['node_id']]; $CR['ts'] = intval( $REC['ts'] ); $CR['ms'] = intval( $REC['ts_ms'] ); $CR['dts'] = date( "H:i:s.{$CR['ms']}", $CR['ts'] ); diff --git a/lib/controller/report/node_13.js b/lib/controller/report/node_13.js index 84188ab..5c76bac 100644 --- a/lib/controller/report/node_13.js +++ b/lib/controller/report/node_13.js @@ -28,7 +28,8 @@ id: 'db_node_%%%NODEID%%%_pic', border: true, width: '100%', - html: '' + html: '
' + //html: '' }/*{ xtype: 'button', id: 'db_download_video', @@ -68,6 +69,7 @@ var xx = p.getWidth() * %%%HEIGHT%%% / %%%WIDTH%%%; p.setHeight( xx + 32 ); VideoLinks[%%%NODEID%%%] = ''; + /* $('#video-%%%NODEID%%%').on('timeupdate', function(){ if( cEventETS > 0 ){ if( this.currentTime > cEventETS ) { @@ -80,10 +82,13 @@ player.fluid(true); //player.fill(true); + */ }, beforedestroy: function(){ var oldPlayer = document.getElementById( 'video-%%%NODEID%%%' ); + /* videojs( oldPlayer ).dispose(); + */ } } } \ No newline at end of file diff --git a/lib/javascript/clipchamp/player.js b/lib/javascript/clipchamp/player.js index 2279981..94144a3 100644 --- a/lib/javascript/clipchamp/player.js +++ b/lib/javascript/clipchamp/player.js @@ -13,7 +13,7 @@ * Released under the MIT license */ (function($) { - var DEFAULT_FPS = 24, + var DEFAULT_FPS = 15, DEFAULT_AUTOLOOP = true, JPEG_MAGIG_NUMBER = [0xff, 0xd8, 0xff]; @@ -56,11 +56,13 @@ imageElement.setAttribute('style', 'width:100%;'); wrapperElement.appendChild(imageElement); - + //Show SLADKIY_BUBALEKH splitMJPEG(mjpegUrl, function(jpegFiles) { + //Hide SLADKIY_BUBALEKH -> or error! + alert( jpegFiles.length ); if (jpegFiles.length > 0) { var nextFrameIndex = 0; - + function showNextFrame() { if (imageElement) { if (jpegUrl) { @@ -80,7 +82,7 @@ } }; imageElement.setAttribute('src', jpegUrl); - } + }; }; setTimeout(function() { @@ -96,6 +98,16 @@ wrapperElement.removeChild(imageElement); imageElement = undefined; } + }, + pause: function(){ + }, + play: function( fromBegin ){ + }, + stop: function(){ + pause(); + }, + alertInfo: function(){ + alert( jpegFiles.length ); } }; }; diff --git a/lib/javascript/jsapi_dynamic/mojo_reports.js b/lib/javascript/jsapi_dynamic/mojo_reports.js index 07c0daa..04fecc2 100644 --- a/lib/javascript/jsapi_dynamic/mojo_reports.js +++ b/lib/javascript/jsapi_dynamic/mojo_reports.js @@ -650,17 +650,31 @@ function loadEventData( record ){ src: VideoLinks[data.node_id] }); VideoPlayer.poster('/style/assets/no-signal.png'); + var CT = cEventTSS - ( data.uts+data.uts_ms/1000 ); + VideoPlayer.currentTime( CT ); + VideoPlayer.play(); break; }; case 'mjpeg':{ ctype = 'video/x-motion-jpeg'; + //var mjpegUrl = "http://127.0.0.1/web/Images/Stream/somevideo.mjpeg"; + var fps = data.fps; + var autoloop = true; + + $( video_t ).clipchamp_mjpeg_player( VideoLinks[data.node_id] , fps, autoloop, + function( wrapperElement, playerInterface ) { + //playerInterface.finish(); + + $( wrapperElement ).dblclick(function(){ + //playerInterface.finish(); + fullScreen( wrapperElement.id ); + }); + + }); break; }; }; - }; - var CT = cEventTSS - ( data.uts+data.uts_ms/1000 ); - VideoPlayer.currentTime( CT ); - VideoPlayer.play(); + }; }; } });