This commit is contained in:
Isaac Connor
2018-04-20 14:24:56 -04:00
parent ac775f13f6
commit fedc4d4cb1

View File

@@ -64,8 +64,10 @@ function frameDataResponse( respObj, respText ) {
return;
}
if ( !event['frames'] )
if ( !event['frames'] ) {
console.log("No frames data in event response");
event['frames'] = new Object();
}
event['frames'][frame.FrameId] = frame;
event['frames'][frame.FrameId]['html'] = createEventHtml( event, frame );
@@ -86,7 +88,7 @@ function requestFrameData( eventId, frameId ) {
}
}
function previewEvent( eventId, frameId ) {
function previewEvent(eventId, frameId) {
if ( events[eventId] ) {
var event = events[eventId];
@@ -109,14 +111,14 @@ function loadEventImage( imagePath, eid, fid, width, height, fps, videoName, dur
if ( videoName && vid ) {
vid.show();
imageSrc.hide();
var newsource=imagePath.slice(0,imagePath.lastIndexOf('/'))+"/"+videoName;
var newsource=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 ) {
//console.log("loading new");
//it is possible to set a long source list here will that be unworkable?
var sources = vid.getElementsByTagName('source');
sources[0].src=newsource;
sources[0].src = newsource;
var tracks = vid.getElementsByTagName('track');
if(tracks.length){
tracks[0].parentNode.removeChild(tracks[0]);
@@ -131,14 +133,14 @@ function loadEventImage( imagePath, eid, fid, width, height, fps, videoName, dur
} else {
if ( vid ) vid.hide();
imageSrc.show();
imageSrc.setProperty( 'src', imagePath );
imageSrc.removeEvent( 'click' );
imageSrc.addEvent( 'click', showEvent.pass( [ eid, fid, width, height ] ) );
imageSrc.setProperty('src', imagePath);
imageSrc.removeEvent('click');
imageSrc.addEvent('click', showEvent.pass([ eid, fid, width, height ]));
}
var eventData = $('eventData');
eventData.removeEvent( 'click' );
eventData.addEvent( 'click', showEvent.pass( [eid, fid, width, height] ) );
eventData.removeEvent('click');
eventData.addEvent('click', showEvent.pass([eid, fid, width, height]));
}
function tlZoomBounds( minTime, maxTime ) {