Restore the download button's behaviour. It is a simple link to the mp4, not an export. Also add a handler for the video.js rate control to sync up our non video.js rate dropdown and stored cookie.

This commit is contained in:
Isaac Connor 2021-09-21 13:00:47 -04:00
parent bf7c13558c
commit 198d9c0f5a
1 changed files with 6 additions and 13 deletions

View File

@ -891,6 +891,12 @@ function initPage() {
vid.on('timeupdate', function() { vid.on('timeupdate', function() {
$j('#progressValue').html(secsToTime(Math.floor(vid.currentTime()))); $j('#progressValue').html(secsToTime(Math.floor(vid.currentTime())));
}); });
vid.on('ratechange', function() {
rate = vid.playbackRate() * 100;
console.log("rate change " + rate);
$j('select[name="rate"]').val(rate);
setCookie('zmEventRate', rate, 3600);
});
// rate is in % so 100 would be 1x // rate is in % so 100 would be 1x
if (rate > 0) { if (rate > 0) {
@ -1018,19 +1024,6 @@ function initPage() {
videoEvent(); videoEvent();
}); });
// Manage the DOWNLOAD VIDEO button
bindButton('#downloadBtn', 'click', null, function onDownloadClick(evt) {
evt.preventDefault();
$j.getJSON(thisUrl + '?request=modal&modal=download&eids[]='+eventData.Id)
.done(function(data) {
insertModalHtml('downloadModal', data.html);
$j('#downloadModal').modal('show');
// Manage the GENERATE DOWNLOAD button
$j('#exportButton').click(exportEvent);
})
.fail(logAjaxFail);
});
// Manage the Event STATISTICS Button // Manage the Event STATISTICS Button
bindButton('#statsBtn', 'click', null, function onStatsClick(evt) { bindButton('#statsBtn', 'click', null, function onStatsClick(evt) {
evt.preventDefault(); evt.preventDefault();