diff --git a/web/ajax/status.php b/web/ajax/status.php index db34e3a64..d12e3c9f6 100644 --- a/web/ajax/status.php +++ b/web/ajax/status.php @@ -117,6 +117,7 @@ $statusData = array( "Height" => true, "Length" => true, "Frames" => true, + "DefaultVideo" => true, "AlarmFrames" => true, "TotScore" => true, "AvgScore" => true, diff --git a/web/skins/classic/views/event.php b/web/skins/classic/views/event.php index 72059f24e..54a2e8dc7 100644 --- a/web/skins/classic/views/event.php +++ b/web/skins/classic/views/event.php @@ -138,7 +138,7 @@ if ( $event['SaveJPEGs'] & 3 )
diff --git a/web/skins/classic/views/js/timeline.js b/web/skins/classic/views/js/timeline.js index e5ffe8105..4e6acd53d 100644 --- a/web/skins/classic/views/js/timeline.js +++ b/web/skins/classic/views/js/timeline.js @@ -111,8 +111,8 @@ function previewEvent( eventId, frameId ) { showEventDetail( events[eventId]['frames'][frameId]['html'] ); var imagePath = events[eventId].frames[frameId].Image.imagePath; - var showVideo = parseInt(monitors[events[eventId].MonitorId].VideoWriter); - loadEventImage( imagePath, eventId, frameId, events[eventId].Width, events[eventId].Height, events[eventId].Frames/events[eventId].Length, showVideo); + var videoName = events[eventId].DefaultVideo; + loadEventImage( imagePath, eventId, frameId, events[eventId].Width, events[eventId].Height, events[eventId].Frames/events[eventId].Length, videoName); return; } } @@ -120,15 +120,15 @@ function previewEvent( eventId, frameId ) requestFrameData( eventId, frameId ); } -function loadEventImage( imagePath, eid, fid, width, height, fps, showVideo ) +function loadEventImage( imagePath, eid, fid, width, height, fps, videoName ) { var vid= $('preview'); var imageSrc = $('imageSrc'); - if(showVideo) + if(videoName) { vid.show(); imageSrc.hide(); - var newsource=imagePrefix+imagePath.slice(0,imagePath.lastIndexOf('/'))+"/event.mp4"; + var newsource=imagePrefix+imagePath.slice(0,imagePath.lastIndexOf('/'))+"/"+videoName; //console.log(newsource); //console.log(sources[0].src.slice(-newsource.length)); if(newsource!=vid.currentSrc.slice(-newsource.length) || vid.readyState==0)