mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-05-18 11:35:15 -04:00
End of video logic
This commit is contained in:
@@ -167,6 +167,37 @@ if ( $Event->DefaultVideo() ) {
|
||||
var duration = <?php echo $Event->Length() ?>, startTime = '<?php echo $Event->StartTime() ?>';
|
||||
|
||||
addVideoTimingTrack(document.getElementById('videoobj'), LabelFormat, monitorName, duration, startTime);
|
||||
|
||||
nearEventsQuery( eventData.Id );
|
||||
|
||||
var video = videojs('videoobj').ready(function(){
|
||||
var player = this;
|
||||
player.on('ended', function() {
|
||||
switch(replayMode.value) {
|
||||
case 'none':
|
||||
break;
|
||||
case 'single':
|
||||
player.play();
|
||||
break;
|
||||
case 'all':
|
||||
<!--nextEventStartTime.getTime() is a mootools workaround, highjacks Date.parse-->
|
||||
var gapDuration = (new Date().getTime()) + (nextEventStartTime.getTime() - <?php echo (strtotime($Event->StartTime()) + $Event->Length())*1000 ?>);
|
||||
var x = setInterval(function() {
|
||||
var now = new Date().getTime();
|
||||
var remainder = new Date(Math.round(gapDuration - now)).toISOString().substr(11,8);;
|
||||
$j("#replayAllCountDown").html(remainder + " to next event.");
|
||||
if (remainder < 0) {
|
||||
clearInterval(x);
|
||||
streamNext( true );
|
||||
}
|
||||
}, 1000);
|
||||
break;
|
||||
case 'gapless':
|
||||
streamNext( true );
|
||||
break;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
} // end if DefaultVideo
|
||||
|
||||
Reference in New Issue
Block a user