From 1cb9f98e9bc7d4dacbbfc30c9c46ac38acd982e2 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 21 Sep 2021 13:00:47 -0400 Subject: [PATCH] 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. --- web/skins/classic/views/js/event.js | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/web/skins/classic/views/js/event.js b/web/skins/classic/views/js/event.js index e2d3c9ce3..727976e76 100644 --- a/web/skins/classic/views/js/event.js +++ b/web/skins/classic/views/js/event.js @@ -891,6 +891,12 @@ function initPage() { vid.on('timeupdate', function() { $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 if (rate > 0) { @@ -1012,19 +1018,6 @@ function initPage() { window.location.assign('?view=export&eids[]='+eventData.Id); }); - // 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 bindButton('#statsBtn', 'click', null, function onStatsClick(evt) { evt.preventDefault();