From d42f6646a5e46fa876ff55d567a3a26cbc52f9df Mon Sep 17 00:00:00 2001 From: j Date: Sun, 29 Nov 2015 14:13:28 +0100 Subject: [PATCH] throttle progress during upload to 1s --- static/js/uploadVideoDialog.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/uploadVideoDialog.js b/static/js/uploadVideoDialog.js index f92c0832..f62a5f80 100644 --- a/static/js/uploadVideoDialog.js +++ b/static/js/uploadVideoDialog.js @@ -162,10 +162,10 @@ pandora.ui.uploadVideoDialog = function(data) { uploadStream(item, info, file); }); }, - function(progress) { + Ox.throttle(function(progress) { progress = JSON.parse(progress).progress || 0; $progress.options({progress: progress}); - } + }, 1000) ); }); }