From 447b0a74ee02d52aabb906aa6e2e86d8c241db29 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 24 Oct 2017 13:45:27 +0200 Subject: [PATCH] handle errors for videos when uploading --- www/common/common-thumbnail.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/www/common/common-thumbnail.js b/www/common/common-thumbnail.js index 049273b50..ea0ce1d54 100644 --- a/www/common/common-thumbnail.js +++ b/www/common/common-thumbnail.js @@ -118,6 +118,9 @@ define([ Thumb.fromCanvas(video, D, cb); }); }); + video.addEventListener('error', function (e) { + cb('ERROR'); + }); }; Thumb.fromBlob = function (blob, cb) { if (blob.type.indexOf('video/') !== -1) {