This commit is contained in:
Isaac Connor 2019-01-21 11:17:21 -05:00
parent c6311b7079
commit e663397816
1 changed files with 13 additions and 11 deletions

View File

@ -1,7 +1,7 @@
var vid = null;
// Function called when video.js hits the end of the video
function vjsReplay() {
var endTime = (Date.parse(eventData.EndTime)).getTime();
switch ( replayMode.value ) {
case 'none':
break;
@ -13,6 +13,7 @@ function vjsReplay() {
var overLaid = $j("#videoobj");
overLaid.append('<p class="vjsMessage" style="height: '+overLaid.height()+'px; line-height: '+overLaid.height()+'px;">No more events</p>');
} else {
var endTime = (Date.parse(eventData.EndTime)).getTime();
var nextStartTime = nextEventStartTime.getTime(); //nextEventStartTime.getTime() is a mootools workaround, highjacks Date.parse
if ( nextStartTime <= endTime ) {
streamNext(true);
@ -22,7 +23,7 @@ function vjsReplay() {
vid.pause();
overLaid.append('<p class="vjsMessage" style="height: '+overLaid.height()+'px; line-height: '+overLaid.height()+'px;"></p>');
var gapDuration = (new Date().getTime()) + (nextStartTime - endTime);
var messageP = $j(".vjsMessage");
var messageP = $j('.vjsMessage');
var x = setInterval(function() {
var now = new Date().getTime();
var remainder = new Date(Math.round(gapDuration - now)).toISOString().substr(11, 8);
@ -574,6 +575,7 @@ function getEventResponse( respObj, respText ) {
//eventImg.setStyles( { 'width': eventData.width, 'height': eventData.height } );
if ( vid && CurEventDefVideoPath ) {
vid.src({type: 'video/mp4', src: CurEventDefVideoPath}); //Currently mp4 is all we use
console.log("getEventResponse");
initialAlarmCues(eventData.Id);//ajax and render, new event
addVideoTimingTrack(vid, LabelFormat, eventData.MonitorName, eventData.Length, eventData.StartTime);
CurEventDefVideoPath = null;